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 show
for a single commitctrl-d
(for d-iff) to showgit diff
since 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 show
for the latest commit in that branchctrl-d
(for d-iff) to showgit diff
since 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 show
for the latest commit in that tagctrl-d
(for d-iff) to showgit diff
since 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$EDITOR
ctrl+b
(for b-rowser) to open in browser (gh
is 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 blame
for this file
This view has its own features:
ctrl+s
(for s-how) to open that commit withshow
ctrl+j
(for j-ump to blame) to show thegit blame
before the selected commitctrl+r
(for r-eload) to reloadgit blame
for 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:1
to your plugin list
With antigen
:
- Add
antigen bundle sobolevn/fzf-simple-git
to 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-git
to the list ofplugins=(fzf-simple-git, ...)
You can fully customize how default fzf
behaves in two ways:
- Via
$FZF_DEFAULT_OPTS
which are respected, recommended - Via redefining
_fsg_fzf
function, 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
pager
behaves with setting$FSG_PAGER
(defaults todelta
if installed and toless
if not) - Customize
delta
's syntax theme if it is intalled with$FSG_BAT_THEME
, (defaults to$BAT_THEME
oransi
) - Customize command for file preview via
$FSG_FILE_PREVIEW
, (defaults tobat
if installed or tocat
if not) - Customize
--ignore-revs-file
filename inblame
with$FSG_BLAME_IGNORE_FILE
, (defaults to.git-blame-ignore-revs
)