Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    accepted option does not provide example of going forward N I was in a situation an hour ago where I wanted to forward more than 1. Tried with multiple and it worked. Wanted to add that here. Will be useful for people looking for undo reset with git reset HEAD~3 Commented Aug 15, 2014 at 8:59
  • 3
    but if some one has done git reset HEAD~3 he can quickly see how to to undo it, git reset HEAD@{3} is required without going into reflog git reset HEAD~3 etc is a common situation Commented Aug 15, 2014 at 9:06
  • 1
    I think anybody seeing {1} / {2} would realise that the number could be any revision number, which the reflog command provides you with. Agreed that your point about the numbers being the same for either direction ~3 / @{3} but didn't really need to be a new answer. Commented Sep 3, 2014 at 16:01