Skip to content

Instantly share code, notes, and snippets.

@hyamamoto
Created December 4, 2013 08:16
Show Gist options
  • Star 34 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save hyamamoto/7783966 to your computer and use it in GitHub Desktop.
Save hyamamoto/7783966 to your computer and use it in GitHub Desktop.
The vimdiff cheat sheet as a git mergetool.

vimdiff cheat sheet

This is a vimdiff cheat sheet as a git mergetool.

Commands

]c          - go to next difference  
[c          - go to previous difference  

do          - diff obtain (other to current), shortened ':diffget'  
dp          - diff put    (current to other), shortened ':diffput'  

:diffupdate - re-scan the files for differences  
:diffthis   - get a diff of files on buffers (from normal mode) 
:diffoff    - return to normal mode   
zo            - open folded text  
zc            - close folded text  

Ctrl+W Ctrl+W - switch to next window  
:ls           - show windows info 

qall!         - quit all buffers  

Windows

  1. Upper-Left
    The local/target branch
  2. Upper-Center
    The most common ancestor of the 'target' and the 'merge' branch
  3. Upper-Right
    The remote/merge branch
  4. Bottom
    The product of this merge operation
@retrodpc
Copy link

i love you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment