Last active
August 29, 2015 14:18
-
-
Save jiangtao/d2c504ea60050bcb8a17 to your computer and use it in GitHub Desktop.
Revisions
-
Matt Ratleph revised this gist
Jan 22, 2013 . 1 changed file with 16 additions and 47 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,56 +1,25 @@ # vimdiff cheat sheet ##git mergetool In the middle file (future merged file), you can navigate between conflicts with `]c` and `[c`. 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). :diffupdate (to remove leftover spacing issues) :only (once you’re done reviewing all conflicts, this shows only the middle/merged file) :wq (save and quit) git add . git commit -m “Merge resolved” If you were trying to do a `git pull` when you ran into merge conflicts, type `git rebase –continue`. ##vimdiff commands ]c : - next difference [c : - previous difference do - diff obtain dp - diff put zo - open folded text zc - close folded text :diffupdate - re-scan the files for differences -
Matt Ratleph revised this gist
Jan 22, 2013 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # vimdiff cheat sheet ##git mergetool. In the middle file (future merged file), you can navigate between conflicts with ]c and [c @@ -27,7 +27,7 @@ map <Leader>2 :diffget BASE<CR> map <Leader>3 :diffget REMOTE<CR> ``` ##vimdiff commands ``` Commands: -
Matt Ratleph revised this gist
Jan 22, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Vimdiff cheat sheet ##Git mergetool. -
Matt Ratleph renamed this gist
Jan 22, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Matt Ratleph revised this gist
Nov 19, 2012 . 1 changed file with 15 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,21 @@ ##Git mergetool. In the middle file (future merged file), you can navigate between conflicts with ]c and [c 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) :diffupdate (to remove leftover spacing issues) :only (once you’re done reviewing all conflicts, this shows only the middle/merged file) :wq (save and quit) git add . git commit -m “Merge resolved” if you were trying to do a git pull when you ran into merge conflicts, type git rebase –continue ##vimdiff key mappings. -
roothybrid7 revised this gist
Nov 3, 2012 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,22 @@ # Vimdiff cheet sheets. ##Git mergetool. ``` $ git config --global merge.tool=vimdiff ``` ##vimdiff key mappings. ``` " vimdiff diffget mappings. map <Leader>1 :diffget LOCAL<CR> map <Leader>2 :diffget BASE<CR> map <Leader>3 :diffget REMOTE<CR> ``` ##vimdiff Commands ``` Commands: ]c : - next difference -
roothybrid7 revised this gist
Nov 3, 2012 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,12 @@ # Vimdiff cheet sheets. ``` " vimdiff diffget mappings. map <Leader>1 :diffget LOCAL<CR> map <Leader>2 :diffget BASE<CR> map <Leader>3 :diffget REMOTE<CR> ``` ``` Commands: ]c : - next difference -
roothybrid7 created this gist
Nov 3, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ # Vimdiff cheet sheets. ``` Commands: ]c : - next difference [c : - previous difference Ctrl+w +w - switch windows do - diff obtain dp - diff put zo - open folded text zc - close folded text :diffupdate - re-scan the files for differences MOVING BETWEEN WINDOWS CTRL-W h move to the window on the left CTRL-W j move to the window below CTRL-W k move to the window above CTRL-W l move to the window on the right CTRL-W t move to the TOP window CTRL-W b move to the BOTTOM window Moving windows CTRL-W K move window to the upper CTRL-W H move window to the far left CTRL-W J move window to the bottom CTRL-W L move window to the far right ```