Vim Fugitive Plugin
A powerful way to use Git inside Vim.
Tips
- compare current file on another branch with
:Gdiff [branch]
- show commits touching visual selection with
'<,'>Gclog
- push specific commit from status window with
-
on git commit hash - open commit in browser with
:GBrowse
Fixup & Autosquash workflow
- Make changes, and stage them
- Open commits with
:Glog
- ‘Enter’ on the commit to fixup to
- Press
cf
after the committer line to create a fixup commit - Press
rf
to perform an interactive rebase using autosquash https://github.com/tpope/vim-fugitive/issues/303