Vim Plugin Fugitive

The Fugitive plugin is a wrapper for Git to complement the command line interface rather than replace it.

Read the documentation. Some short examples:

  • :Git status executes any Git command (same as :!git status
    • mostly helpful to use Vim's power, e.g. :Git add % to stage the current file
  • :Gblame opens a vertical split that is linked to the source file
  • :Gread does a git checkout -- filename to revert a file to the last committed version
  • :Gwrite add the current file to the index (git add filename)

social