On Fri, 29 Jul 2016 09:10:06 -0700
Michael <keybou...@gmail.com> wrote:

> After doing a "git merge", I wind up with a few conflicts.
> 
> My files have the three states.
> 
> I am finding that I almost always want the third state (between ===
> and >>>) to resolve these conflicts.
> 
> How can I tell merge, AFTER seeing the conflicts, and looking at
> them, to use the third option for resolution?
> 
> To clarify: I'm not asking for the third state in all cases. I'm not
> asking for those files to replace everything else (that's what I
> understand the "--ours" option does). I'm not asking to do this on
> the initial merge command before I've seen what the conflicts are
> going to turn out to be.
> 
> After I've done the "git merge" and it has failed, how can I then
> auto-select on a file by file basis?

I think you want

  $ git checkout --ours .
  $ git add -u
  $ git commit

"The trick" is that `git checkout` working on files, and not given a
<tree-ish> argument to take contents from, uses the index, and for
unmerged entries, the index stores two versions of the entry's
content: theirs and ours.

You might also use `git checkout --ours` on individual files, of course.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to