From: Sergio Belkin <sebelk@gmail.com>
To: git@vger.kernel.org
Subject: Re: Set the repository as it was on an earlier commit
Date: Mon, 28 Dec 2009 01:19:29 -0300 [thread overview]
Message-ID: <8c6f7f450912272019t4b9c721dt2630a8d32607013e@mail.gmail.com> (raw)
In-Reply-To: <vpqiqbt95e7.fsf@bauges.imag.fr>
2009/12/26 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:
> Santi Béjar <santi@agolina.net> writes:
>
>> I don't know if it is possible with porcelain commands, but with
>> plumbing you can:
>>
>> # begin with a clean working dir
>> git read-tree B
>> git commit
>> git reset --hard
>
> I guess
>
> (at the root of the repo)
>
> git checkout B -- .
> # git status if you want to check.
> git commit
>
> does this. The "-- ." part of "git checkout" asks Git to checkout the
> files, but the path limiter prevents it from updating HEAD, so the
> HEAD still points to the tip of the branch.
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
>
Sorry but really answer given by Steven was better, because last one
omit the case when B had less files that D for example...
Thanks everyone
--
--
Open Kairos http://www.sergiobelkin.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -
next prev parent reply other threads:[~2009-12-28 4:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 23:09 Set the repository as it was on an earlier commit Sergio Belkin
2009-12-25 23:24 ` Steven Noonan
2009-12-25 23:36 ` Santi Béjar
2009-12-26 14:28 ` Matthieu Moy
2009-12-28 4:19 ` Sergio Belkin [this message]
2009-12-28 5:18 ` Fwd: " Sergio Belkin
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=8c6f7f450912272019t4b9c721dt2630a8d32607013e@mail.gmail.com \
--to=sebelk@gmail.com \
--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).