Suppose I'm on Git branch master and I git merge featurebranch. There is a conflict in foo.html.
When I open foo.html, I see, in the area of the conflict, what master has and what featurebranch has. But I can't really tell what change was made on master that conflicted with featurebranch; I only know what master has now.
I'd like to see the diff that each one applied.
Or, to get the same information, I could see:
master has nowfeaturebranch has nowHow can I see this?
From git-merge(1),
An alternative style can be used by setting the "merge.conflictstyle" configuration variable to "diff3".
In addition to the
<<<<<<<,=======, and>>>>>>>markers, it uses another|||||||marker that is followed by the original text. ... You can sometimes come up with a better resolution by viewing the original.
This can be enabled using
git config --global merge.conflictstyle diff3 or right in ~/.gitconfigfile
[merge] conflictstyle = diff3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With