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.

3
  • 1
    One-liner worked for me, thank you, but I am just wondering what exactly that "@{1}" does.. Commented Nov 30, 2015 at 19:45
  • 1
    @StanB The documentation is here: git-scm.com/docs/git-rev-parse basically it refers to the first reflog entry on the current branch.
    – Ajedi32
    Commented Nov 30, 2015 at 20:44
  • Thanks for covering all the cases. I hadn't committed or added mine.
    – xdhmoore
    Commented Feb 28, 2018 at 20:23