fzf plugin for zsh to enable smart suggestions for common git use-cases.
All commands require ctrl-g (for g-it) to be pressed before the actual command.
ctrl-g + ctrl-] opens up usage guide.
ctlr-g + ctrl-l (for l-og) opens up git log of all commits.
fzf-simple-git-log.mp4
From there:
ctrl-s(for s-how) to opengit showfor a single commitctrl-d(for d-iff) to showgit diffsince that commitctrl-b(for b-rowser) to open GitHub in a browser with the commit, requiresgh
ctlr-g + ctrl-b (for b-ranch) opens git branch of recent branches.
fzf-simple-git-branch.mp4
From there:
ctrl-s(for s-how) to opengit showfor the latest commit in that branchctrl-d(for d-iff) to showgit diffsince that commitctrl-b(for b-rowser) to open GitHub in a browser with the branch, requiresgh
ctlr-g + ctrl-t (for t-ags) opens git tag of all tags.
2025-07-27.16.16.02.mov
From there:
ctrl-s(for s-how) to opengit showfor the latest commit in that tagctrl-d(for d-iff) to showgit diffsince that commitctrl-b(for b-rowser) to open GitHub in a browser with the tag, requiresgh
ctrl-g + ctrl-f (for f-files) opens git ls-files.
2025-07-25.16.07.09.mov
From there:
ctrl+o(for o-pen) to open a file in$EDITORctrl+b(for b-rowser) to open in browser (ghis required)ctrl+d(for d-eleted) to show deleted filesctrl+r(for r-eload) to reload filesctrl+j(for j-ump to blame) to showgit blamefor this file
This view has its own features:
ctrl+s(for s-how) to open that commit withshowctrl+j(for j-ump to blame) to show thegit blamebefore the selected commitctrl+r(for r-eload) to reloadgit blamefor this filectrl+b(for b-rowser) to open the commit in a browser, requiresgh
<tab>to select multiple entriesctrl+h(for h-ide) to hide preview windowctrl+]to show help in a preview window
With zplug:
- Add
zplug 'sobolevn/fzf-simple-git', depth:1to your plugin list
With antigen:
- Add
antigen bundle sobolevn/fzf-simple-gitto your plugin list
With oh-my-zsh:
git clone https://github.com/sobolevn/fzf-simple-git.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-simple-git- Add
fzf-simple-gitto the list ofplugins=(fzf-simple-git, ...)
You can fully customize how default fzf behaves in two ways:
- Via
$FZF_DEFAULT_OPTSwhich are respected, recommended - Via redefining
_fsg_fzffunction, it is not recommended, but works
You can customize how ctlr-b works with _fzf_git_cli function redefinition.
For example, you can use GitLab CLI if that's common for you.
Or decide based on the origin URL. Or provided other options.
Env vars:
- Customize how
pagerbehaves with setting$FSG_PAGER(defaults todeltaif installed and tolessif not) - Customize
delta's syntax theme if it is intalled with$FSG_BAT_THEME, (defaults to$BAT_THEMEoransi) - Customize command for file preview via
$FSG_FILE_PREVIEW, (defaults tobatif installed or tocatif not) - Customize
--ignore-revs-filefilename inblamewith$FSG_BLAME_IGNORE_FILE, (defaults to.git-blame-ignore-revs)