Hacker News new | past | comments | ask | show | jobs | submit login

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.




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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: