fzf-git makes Git files and commits selection easy.
Key-bindings
Tab
key to select multi filesCtrl+down
to scroll preview
Key-bindings
Tab
key to select multi commitsCtrl+down
to scroll previewleft
key to display branch selection in the commits selectionright
key to display commits of selected branch in the branch selection
# Install requirements
$ brew install fzf
$ brew install expect
$ cd ~
$ git clone [email protected]:otoyo/fzf-git.git
Add the following into ~/.zshrc
[ -d ~/fzf-git ] && \
source ~/fzf-git/fzf-git.zsh && \
bindkey '^G' fzf-git-widget && \
bindkey '^H' fzf-git-commit-widget
And reload ~/.zshrc
$ source ~/.zshrc
Now you can use fzf-git by Ctrl+G
and Ctrl+H
in the Git repositories.
And, you can use multi-select by pressing Tab
in fzf console.
fzf-git-widget
: Search files fromgit status
fzf-git-commit-widget
: Search commits fromgit log
Pull fzf-git.git and reload ~/.zshrc
$ cd ~/fzf-git
$ git pull origin master
$ source ~/.zshrc
Feel free to open a Pull Requests ;)