Hacker News new | ask | show | jobs
by gizzlon 5262 days ago
another negative sentence: "you can just point the branch pointer back at the previous commit with git reset --hard HEAD@{1}"

just? Wtf is HEAD@{1} ?

That might be simple, but as usual, only if you know a lot about git.

As a casual git user this annoys me; Even when doing basic stuff I often have to read a long blog-post about how git works internally. I can't remember having this problem when I was a casual Mercurial user.

1 comments

Run git reflog—HEAD@{1} is (at least as I understand it) "the state HEAD was at 1 commit ago"—including things such as rebasing and reverting.