Show Menu
Cheatography

vim-fugitive Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

:Gread

:Gread
Reads the index into the buffer

:Gwrite

:Gwrite
Writes the buffer to the index.

Miscel­laneous

:Gremove
git rm
and wipes the buffer
:Gmove target
git mv
and renames the buffer
:Gmove /target
git mv
(relative to the repo) and renames the buffer

:Gedit

:Gedit :path/to/file
Edits the indexed version of a file
:Gedit :0
Edits the indexed version of the current file
 

:Gstatus

<C-­N>
/
<C-­P>
next/p­revious file
<CR>
:Gedit
-
:Git add/reset
ca
:Gcommit --amend
cc
:Gcommit
D
:Gdiff
p
:Git add --patch
r
reload
o
/
S
:Gsplit / :Gvsplit

:Gdiff

:Gwrite

(from index)
Resets the working copy from the index
:Gwrite

(from working copy)
Adds the working copy to the index
:Gread

(from working copy)
Resets the working copy from the index
:diffget

do
Copies the diff from the other buffer to this
:diffput

du
Copies the selected diff from this buffer to the other
:diffu­pdate
Updates the highli­ghting
Displays the difference between the index (left) and the working copy (right).

:Gcommit

 
 

:Gpull

 

:Gpush