Utility tool for using git interactively. Powered by junegunn/fzf.
This tool is designed to help you use git more efficiently. It's lightweight and easy to use.
Note: Requires fzf. Make sure
you have it installed.
📝 Features
- Interactive
git addselector (ga)

- Interactive
git logviewer (glo)

The log graph can be disabled by option FORGIT_LOG_GRAPH_ENABLE (see discuss in issue #71).
- Interactive
.gitignoregenerator (gi)

Interactive
git diffviewer (gd)Interactive
git reset HEAD <file>selector (grh)Interactive
git checkout <file>selector (gcf)Interactive
git checkout <branch>selector (gcb)Interactive
git checkout <tag>selector (gct)Interactive
git checkout <commit>selector (gco)Interactive
git revert <commit>selector (grc)Interactive
git stashviewer (gss)Interactive
git cleanselector (gclean)Interactive
git cherry-pickselector (gcp)Interactive
git rebase -iselector (grb)Interactive
git commit --fixup && git rebase -i --autosquashselector (gfu)
git
Fig will automatically configure forgit for use as a git alias as well.
So you can do, e.g.
$ git forgit log
$ git forgit add
$ git forgit diff
💡 Tips
- Most of the commands accept optional arguments (eg,
glo develop,glo f738479..188a849b -- main.go,gco master). gdsupports specifying revision(eg,gd HEAD~,gd v1.0 README.md).- Call
giwith arguments to get the wanted.gitignorecontents directly(eg,gi cmake c++). - You can use the commands as sub-commands of
git, see #147 for details.
⌨ Keybinds
| Key | Action |
|---|---|
| Enter | Confirm |
| Tab | Toggle mark and move up |
| Shift - Tab | Toggle mark and move down |
| ? | Toggle preview window |
| Alt - W | Toggle preview wrap |
| Ctrl - S | Toggle sort |
| Ctrl - R | Toggle selection |
| Ctrl - Y | Copy commit hash* |
| Ctrl - K / P | Selection move up |
| Ctrl - J / N | Selection move down |
| Alt - K / P | Preview move up |
| Alt - J / N | Preview move down |
* Available when the selection contains a commit hash.
For linux users FORGIT_COPY_CMD should be set to make copy work. Example: FORGIT_COPY_CMD='xclip -selection clipboard'.