From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: Russell King <rmk@arm.linux.org.uk>
Cc: git@vger.kernel.org
Subject: Re: git merge vs git commit
Date: Tue, 09 Sep 2008 23:32:21 +0200 [thread overview]
Message-ID: <vpqiqt50zve.fsf@bauges.imag.fr> (raw)
In-Reply-To: <20080909165236.GA8850@flint.arm.linux.org.uk> (Russell King's message of "Tue\, 9 Sep 2008 17\:52\:37 +0100")
Russell King <rmk@arm.linux.org.uk> 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
next prev parent reply other threads:[~2008-09-09 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 16:52 git merge vs git commit Russell King
2008-09-09 17:34 ` Junio C Hamano
2008-09-09 18:54 ` Miklos Vajna
2008-09-09 19:11 ` Junio C Hamano
2008-09-09 21:32 ` Matthieu Moy [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-10 17:42 Ulrik Sverdrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqiqt50zve.fsf@bauges.imag.fr \
--to=matthieu.moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.