Vim Fugitive Plugin

A powerful way to use Git inside Vim.

GitHub: vim-fugitive

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

Fixup & Autosquash workflow

  1. Make changes, and stage them
  2. Open commits with :Glog
  3. ‘Enter’ on the commit to fixup to
  4. Press cf after the committer line to create a fixup commit
  5. Press rf to perform an interactive rebase using autosquash

https://github.com/tpope/vim-fugitive/issues/303