Subject: Re: Git in a Nutshell guide

From: Matthieu Moy <[email-masked]>
Date: Mon, 19 Nov 2007 18:05:32 +0100

Benoit Sigoure <[email-masked]> writes:

>  git reset --hard HEAD~42 and then git reset --hard A.

And if you don't "remember" A, the reflog is here for you.

$ git reflog show HEAD
$ git reset --hard HEAD@{42} # not "the 42th ancestor"
                             # but "where HEAD was 42 moves ago".

By default, the reflog will expire after IIRC, 3 months, and git-prune
will not prune the objects while they are reachable.

So, it's even safer than you say ;-).

-- 
Matthieu