merge conflict diff
- From
- Jeremy Ramer <jdramer@gmail.com>
- Date
- Apr 3, 2008, 14:13 UTC
- Message-ID
- <b9fd99020804030713n3c1a2602t847e8a132f8ccd06@mail.gmail.com>
Hi, I am trying to figure out how to quickly diff two source files that led to a merge conflict. When a conflict occurs the command # git diff performs a diff -cc, but I would like to compare the files before any merging takes place so I can decide if I should just take all the changes from one of the sources. i.e. take the changes from the merging branch: # git checkout-index -f -u --stage=3 foo # git add foo
So far I am thinking of # git checkout-index --stage=2 --temp foo # git checkout-index --stage=3 --temp foo # git diff .merge_x1 .merge_x2
Are there any built-in ways to accomplish this? I'd like to be able to build a script that can quickly start the diff based on the file name I provide.
Thanks! Jeremy