https://github.com/otoyo/fzf-git
Interactive Git tools with fzf
https://github.com/otoyo/fzf-git
fzf git zsh zsh-plugin
Last synced: 2 months ago
JSON representation
Interactive Git tools with fzf
- Host: GitHub
- URL: https://github.com/otoyo/fzf-git
- Owner: otoyo
- License: mit
- Created: 2020-11-19T23:50:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-23T02:01:40.000Z (almost 5 years ago)
- Last Synced: 2025-08-13T19:17:53.360Z (11 months ago)
- Topics: fzf, git, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fzf-git
fzf-git makes Git files and commits selection easy.
## Feature
### File selection

Key-bindings
* `Tab` key to select multi files
* `Ctrl+down` to scroll preview
### Commits selection

Key-bindings
* `Tab` key to select multi commits
* `Ctrl+down` to scroll preview
* `left` key to display branch selection in the commits selection
* `right` key to display commits of selected branch in the branch selection
## Requirements
* Zsh
* Git
* [fzf](https://github.com/junegunn/fzf)
* [expect](https://formulae.brew.sh/formula/expect)
## Installation
```sh
# Install requirements
$ brew install fzf
$ brew install expect
$ cd ~
$ git clone git@github.com:otoyo/fzf-git.git
```
Add the following into `~/.zshrc`
```sh
[ -d ~/fzf-git ] && \
source ~/fzf-git/fzf-git.zsh && \
bindkey '^G' fzf-git-widget && \
bindkey '^H' fzf-git-commit-widget
```
And reload `~/.zshrc`
```sh
$ 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.
## Widgets
* `fzf-git-widget`: Search files from `git status`
* `fzf-git-commit-widget`: Search commits from `git log`
## Update
Pull fzf-git.git and reload `~/.zshrc`
```sh
$ cd ~/fzf-git
$ git pull origin master
$ source ~/.zshrc
```
## Contribution
Feel free to open a Pull Requests ;)