Created
June 3, 2016 18:39
-
-
Save hyponymous/3600f06f5cb60ba824ef9f06021c7638 to your computer and use it in GitHub Desktop.
One-liner that creates two diffs of a conflicted file (whose name is in the paste buffer) and opens them side by side in vim – for resolving merge conflicts
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 characters
file=$(pbpaste); git diff -b -M :1:$file :2:$file >~/tmp/left.diff; git diff -b -M :1:$file :3:$file >~/tmp/right.diff; vim -O ~/tmp/left.diff ~/tmp/right.diff # ;three-way |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment