Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: can git reset or checkout be reverted?

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:46:06

bill lam [off-list ref] writes:
If I want to recall a old version of testing by

git reset --hard sha1
or
git checkout sha1

then git log does not show anything beyond that commit. It does give
some warning and recommend -b switch next time.  If I only do that by
accident or ignorance.  How to revert to the original HEAD?
  git checkout ORIG_HEAD

or

  git checkout HEAD@{1}

You can check it out wrt. second form using "git reflog" ("git log -g").

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help