[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: how to ignore merge conflicts?
From:       Linus Torvalds <torvalds () osdl ! org>
Date:       2006-10-30 20:29:37
Message-ID: Pine.LNX.4.64.0610301223021.25218 () g5 ! osdl ! org
[Download RAW message or body]



On Mon, 30 Oct 2006, Len Brown wrote:
>
> 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?

Well, if you promise not to do what has happened several times before in 
people who maintained their own CVS trees, for example (which is to just 
ignore all merge problems, and force _their_ version, even though the 
reason for the merge problem was that somebody else had fixed a bug, that 
was now unfixed by the "merge"), here's the trivial way to do it:

	git checkout HEAD the/file/you/wanted.c

(or, if you want to take it from the source you are merging _from_, just 
use MERGE_HEAD instead of HEAD).

And you're done.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic