# git diff after merge (with conflict)

3 messages from 2009-04-09 to 2009-04-11. Participants: layer, Teemu Likonen, Junio C Hamano.
Thread: https://gitlist.dev/t/18808

## layer, 2009-04-09 17:27

Subject: git diff after merge (with conflict)
Message-ID: <324.1239298063@relay.known.net>
URL: https://gitlist.dev/e/324.1239298063%40relay.known.net

```
Is there some way to get regular unified diff behavior instead of the
combined diff?  For certain files (like ChangeLog's) the combined diff
format after a merge is *very* confusing.

Thanks.

Kevin

```

## Teemu Likonen, 2009-04-09 17:40

Subject: Re: git diff after merge (with conflict)
Message-ID: <87ljq97mjg.fsf@iki.fi>
URL: https://gitlist.dev/e/87ljq97mjg.fsf%40iki.fi
In-Reply-To: <324.1239298063@relay.known.net>

```
On 2009-04-09 10:27 (-0700), layer wrote:

> Is there some way to get regular unified diff behavior instead of the
> combined diff? For certain files (like ChangeLog's) the combined diff
> format after a merge is *very* confusing.

Maybe the following commands are helpful:

    git diff --base
    git diff --ours
    git diff --theirs

Those options are not documented in git-diff(1), by the way.

```

## Junio C Hamano, 2009-04-11 00:47

Subject: Re: git diff after merge (with conflict)
Message-ID: <7vvdpcnhi2.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvdpcnhi2.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <324.1239298063@relay.known.net>

```
layer <layer@known.net> writes:

> Is there some way to get regular unified diff behavior instead of the
> combined diff?  For certain files (like ChangeLog's) the combined diff
> format after a merge is *very* confusing.

If you mean the resolution preview (that is you said "after merge with
conflict", but what you meant was really "during a merge with conflict, I
haven't recorded the final resolution with git-add yet"), I often find
these two useful:

	What change does the other branch brought to my tree anyway?
	$ git diff HEAD -- that-file

	What did we do to the other branch?
	$ git diff MERGE_HEAD -- that-file

```
