git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git diff after merge (with conflict)

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 11, 2009, 00:47 UTC
Message-ID
<7vvdpcnhi2.fsf@gitster.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
Previous: Teemu Likonen
Message 3 of 3 in “git diff after merge (with conflict)”
  1. layerApr 9, 2009
  2. Teemu LikonenApr 9, 2009
  3. Junio C HamanoApr 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.