Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Git in a Nutshell guide

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:52

Benoit Sigoure [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help