Guest User

Untitled

a guest
Oct 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. # vimdiff cheat sheet
  2.  
  3. ##git mergetool
  4.  
  5. In the middle file (future merged file), you can navigate between conflicts with `]c` and `[c`.
  6.  
  7. Choose which version you want to keep with `:diffget //2` or `:diffget //3` (the `//2` and `//3` are unique identifiers for the target/master copy and the merge/branch copy file names).
  8.  
  9. :diffupdate (to remove leftover spacing issues)
  10. :only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
  11. :wq (save and quit)
  12. git add .
  13. git commit -m “Merge resolved”
  14.  
  15. If you were trying to do a `git pull` when you ran into merge conflicts, type `git rebase –continue`.
  16.  
  17. ##vimdiff commands
  18.  
  19. ]c : - next difference
  20. [c : - previous difference
  21. do - diff obtain
  22. dp - diff put
  23. zo - open folded text
  24. zc - close folded text
  25. :diffupdate - re-scan the files for differences
  26. Ctrl-W W - jump cursor to next pane
Add Comment
Please, Sign In to add comment