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

Re: setting merge conflict style

From
Jeff King <peff@peff.net>
Date
Feb 15, 2012, 05:00 UTC
Message-ID
<20120215050002.GA29902@sigill.intra.peff.net>
In-Reply-To
<CAJ6vYjcefsPUfibnySpwFk2bGTC1mpBWF6Tjv5AgyyZcn0-d3A@mail.gmail.com>
On Wed, Feb 15, 2012 at 02:12:57PM +1100, Chris Leong wrote:
> Apparently setting merge.conflictstyle to diff3 will display the base
> when diffing an incomplete merge, instead of just ours and theirs.
Yep.
> Is there a way to run this command without setting the config, so that
> I can switch between normal diffs and diff3s easily?

If a conflict is marked in the index (i.e., the state you are in after a conflicted merge, but before you mark a path as resolved), you can do:

  git checkout --conflict=diff3 <path...>

Note that that is actually checking out the index contents into the working tree, so any edits you may have made to the conflicted working tree copy will be overwritten.

-Peff
Previous: Chris Leong
Message 2 of 2 in “(unknown)”
  1. Chris LeongFeb 15, 2012
  2. Jeff KingFeb 15, 2012

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.