Thread (1 message) 1 message, 1 author, 2016-06-15

Re: git merge vs git commit

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:45:20

Russell King [off-list ref] writes:
Hi,

Using git 1.5.4.5, I notice that the result from git merge and git commit
are different in an unexpected way.

Take the following tree:

     B---C---D---E2
    /
  -A1
    \
     F---G---H---I3

(letters represent commits, numbers represent where the references are).

Your current head is '1', and you want to merge branches '2' and '3', so
you use:

	git merge 2 3
AAUI, "git merge 2 3" doesn't mean "merge 2 and 3 together", but
"merge 2 and 3 with the current HEAD". So, what you wanted was :

git checkout 1
git merge 2

And what you did was an octopus merge of A, E and I (which ends up
being the same since A is anyway the common ancestor of E and I).

Now, this doesn't explain why the conflicted merge gives a result
different from the other.

-- 
Matthieu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help