Thread with 4 posts

jump to expanded post
Julia Evans , @b0rk@jvns.ca
(open profile)

what are some situations where you've needed to think about what HEAD is in git?

so far I have:

- git checkout HEAD^^
- git rebase -i HEAD^^^^
- git diff HEAD
- git push origin HEAD:targetbranch
- HEAD~1, HEAD~2, etc
- git show HEAD^
- git reset --hard HEAD^

and in git's output:

- "detached HEAD state"
- merge conflicts (“<<<<<<< HEAD”)
- git reflog output ("(HEAD -> main)”)
- git reflog output ("HEAD@{5}”)

what else?

Open remote post (opens in a new window)