On Wed, Dec 19, 2007 at 10:30:27AM -0800, Lan Barnes wrote:

From a developer's POV you're right, but it's an oversimplification. Many
merges can and should be resolved by "accept theirs" or "accept mine."

  % git merge -s ours branchname

does the easy case of just leaving my tree alone.  The other case is just a
little bit harder:

  % git merge -s ours branchname
  % git checkout branchname
  % git commit -a

Since merges in git can be done from either direction, I suspect that the
'ours' is most commonly done, since nobody seems to have made the 'theirs'.
Given that 'git-merge-ours' is a single line shell script, I wouldn't
imagine writing a 'theirs' would be all that hard to make.

Also, reading up a bit, if you have merge conflicts, you can then run:

  % git mergetool

which will run your prefered merge tool.  If you haven't configured a tool,
it walks through a list of ones it knows about and runs the first one
that's in your path: kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff,
gvimdiff, opendiff.

Dave


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to