From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Joachim Schmitz" <jojo@schmitz-digital.de>
Cc: "'Junio C Hamano'" <gitster@pobox.com>, "'git'" <git@vger.kernel.org>
Subject: Re: How to update a cloned git repository
Date: Wed, 12 Sep 2012 10:52:37 +0200 [thread overview]
Message-ID: <vpqtxv34o8a.fsf@bauges.imag.fr> (raw)
In-Reply-To: <007401cd903c$f425fc20$dc71f460$@schmitz-digital.de> (Joachim Schmitz's message of "Tue, 11 Sep 2012 18:46:11 +0200")
"Joachim Schmitz" <jojo@schmitz-digital.de> writes:
>> I think it is the-merge-commit^2; contrib/git-resurrect.sh might be
>> of interest, too.
>
> Sorry you lost me, this is greek to me...
A commit is an object that contain pointers to its parents. The root
commit has no parent. For ordinary commits, there is one parent which is
the commit on top of which it was created. For merge commits, there are
N commits, the first is the one on top of which the merge was created,
and the N-1 next ones are the commits being merged.
commit^ => first parent of commit
commit^1 => same
commit^2 => second parent, i.e. the one merged in commit.
See in git.git:
$ git show cb10ae9433126ef <---------------------------- one commit to study
commit cb10ae9433126efbc4dcc46779d7ef2fe6b1f597
Merge: 13b608a 9aeaab6 <------------------------------- list of parents
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Sep 11 15:57:04 2012 -0700
Merge branch 'jc/maint-blame-no-such-path' into pu
* jc/maint-blame-no-such-path:
blame: allow "blame file" in the middle of a conflicted merge
$ git show cb10ae9433126ef^1 <-------------------- "previous commit" in origin/pu
commit 13b608a063ce861929322e6bb3862b5364f3fbcf
Merge: fa17a26 bdee397
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Sep 11 11:50:44 2012 -0700
Merge branch 'dg/run-command-child-cleanup' into pu
* dg/run-command-child-cleanup:
run-command.c: fix broken list iteration in clear_child_for_cleanup
$ git show cb10ae9433126ef^2 <----------------- commit being merged by cb10ae9433126ef
commit 9aeaab6811dce596b4f6141d76f5300359bfd009
Author: Junio C Hamano <gitster@pobox.com>
Date: Tue Sep 11 14:30:03 2012 -0700
blame: allow "blame file" in the middle of a conflicted merge
[...]
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2012-09-12 8:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 10:49 How to update a cloned git repository Joachim Schmitz
2012-09-11 11:06 ` Matthieu Moy
2012-09-11 11:17 ` Joachim Schmitz
2012-09-11 11:21 ` Matthieu Moy
[not found] ` <007001cd9016$8f980f80$aec82e80$@schmitz-digital.de>
2012-09-11 12:40 ` Matthieu Moy
2012-09-11 12:48 ` Joachim Schmitz
2012-09-11 13:07 ` Erik Faye-Lund
2012-09-11 16:05 ` Junio C Hamano
2012-09-11 16:21 ` Matthieu Moy
2012-09-11 16:46 ` Joachim Schmitz
2012-09-12 8:52 ` Matthieu Moy [this message]
2012-09-11 14:09 ` Sitaram Chamarty
2012-09-11 16:00 ` Junio C Hamano
2012-09-11 16:45 ` Joachim Schmitz
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=vpqtxv34o8a.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jojo@schmitz-digital.de \
/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.