Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

merge conflict diff

From: Jeremy Ramer <hidden>
Date: 2016-06-15 22:44:27

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help