How do I open the current file at a previous Git revision with vim-fugitive?
:Gedit HEAD~1:%
When you are deep in a refactor, you often need to compare the current buffer with an older version of the same file.
:Gedit HEAD~1:%
When you are deep in a refactor, you often need to compare the current buffer with an older version of the same file.
:Gvdiffsplit!
When reviewing staged versus unstaged changes, jumping between terminal git commands and editor windows is slow.
"=system('git rev-parse --short HEAD')->trim()<CR>p
If you frequently write commit references in notes, code comments, or release docs, you can avoid shell context switches and paste the hash straight from Vim.
:Gdiffsplit HEAD~1
vim-fugitive's :Gdiffsplit opens a vertical split showing the current file diff against any git revision — not just HEAD.
:Gclog
Running :Gclog in vim-fugitive loads the git log for the current file into the quickfix list.
:diffget //2
When resolving Git merge conflicts with vim-fugitive, running :Gvdiffsplit! opens a 3-way split: your current branch (left), the working file with conflict mark
:0Gclog
vim-fugitive's :Gclog command loads the git log into the quickfix list, but when prefixed with the range 0 it restricts the history to only the commits that tou
]c / [c (gitsigns.nvim)
gitsigns.
:Gitsigns preview_hunk
gitsigns.
:Git log --oneline --graph
Tim Pope's vim-fugitive provides a complete Git interface inside Vim.
:Git or :G
vim-fugitive provides Git integration.
:cq
The :cq command quits Vim and returns a non-zero exit code to the calling process.
<Leader>hs / <Leader>hu
The vim-gitgutter plugin shows Git diff markers in the sign column and provides powerful commands to stage, undo, and preview individual hunks directly from Vim
:GBrowse
The vim-fugitive plugin combined with vim-rhubarb (for GitHub support) provides the :GBrowse command, which opens the current file on your repository's web host
:Gdiffsplit
The vim-fugitive plugin provides :Gdiffsplit (and its vertical variant :Gvdiffsplit) to open a side-by-side diff view comparing the working tree version of a fi
:Git blame
The vim-fugitive plugin by Tim Pope provides a powerful interactive :Git blame that goes far beyond the basic command-line git blame.
:Git
The vim-fugitive plugin by Tim Pope provides an interactive Git status window that lets you stage, unstage, diff, and commit files entirely from within Vim.
:Gedit HEAD~3:%
The vim-fugitive plugin lets you open any version of any file from your Git history directly in a Vim buffer using the :Gedit command.
]c / [c
The vim-gitgutter plugin shows Git diff markers in the sign column and provides ]c and [c mappings to jump between changed hunks — groups of added, modified,