gitx is an ever-evolving collection of extension commands to git.
gitx help # show help
gitx file-pick # interactively pick files from another branchWith NPM:
npm install -g gitxWith PNPM:
pnpm install -g gitxWith Homebrew:
brew install gitx# show help
gitx help
# show version
gitx --versionInteractively select files from another branch and copy them into the current branch as unstaged changes.
Unlike git cherry-pick, this command works on files, not commits.
This is all done via a TUI (Terminal User Interface), with interactive file selection.
It works only for local branches!
- The program must be run while on an active branch (not detached HEAD).
- Unless a source branch is provided via
--source, the user is prompted to select a local source branch. Type-ahead is used to filter all local branches. Enter selects the branch. - The current branch is the destination. Files are copied as unstaged changes.
- The user is prompted to select files to copy from the source branch. Type-ahead is used to filter all files. Space toggles selection. Enter confirms selection.
- A final confirmation screen lists the operations and asks for
[Y/n]confirmation.
# Pick files from a branch you interactively select into the current branch
gitx file-pick# Pick files from the source branch into the current branch
gitx file-pick -s source-branch
gitx file-pick --source source-branch