From: Russell King <rmk@arm.linux.org.uk>
To: git@vger.kernel.org
Subject: git merge vs git commit
Date: Tue, 9 Sep 2008 17:52:37 +0100 [thread overview]
Message-ID: <20080909165236.GA8850@flint.arm.linux.org.uk> (raw)
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
If there aren't any conflicts, you get a nice clean merge, resulting in:
B---C---D---E2
/ \
-A J1
\ /
F---G---H---I3
However, if you have a conflict that needs resolving, you fix it up as
normal, and then use git commit. This results in:
B---C---D---E2
/ \
-A---------------K1
\ /
F---G---H---I3
instead - an additional reference from commit 'K' back to commit 'A'
which isn't present in the clean merge case.
Is this intentional, or is it a bug?
--
Russell King
next reply other threads:[~2008-09-09 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 16:52 Russell King [this message]
2008-09-09 17:34 ` git merge vs git commit 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
-- 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=20080909165236.GA8850@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).