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

Re: how to ignore merge conflicts?

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 30, 2006, 20:06 UTC
Message-ID
<ei5lv0$2jv$1@sea.gmane.org>
In-Reply-To
<200610301448.38222.len.brown@intel.com>
Len Brown wrote:
Show 7 quoted lines
> Sometimes when a multiple-file merge give conflicts, I don't want to edit
> one of the resulting <<<<<=====>>>>> files.
> Instead, I just want to choose the version of that particular file that
> existed in one of the two merged branches and commit that along with
> the rest of the merge.
> 
> How to do this?

$ git cat-file -p :<n>:<filename> > <filename> $ git update-index <filename>

where <n> is one of stages, 1 or 2 to choose one branch version if I remember correctly. Check out documentation.

Or just use 'ours' as merge strategy...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Shawn PearceNext: Linus Torvalds
Message 3 of 5 in “how to ignore merge conflicts?”
  1. Len BrownOct 30, 2006
  2. Shawn PearceOct 30, 2006
  3. Jakub NarebskiOct 30, 2006
  4. Linus TorvaldsOct 30, 2006
  5. Len BrownNov 1, 2006

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.