Skip to content

HEAD

Medium — good to knowGit & Version Control

ELI5 — The Vibe Check

HEAD is like a bookmark that says 'you are here' in your Git history. It points to the commit you're currently looking at. When you switch branches, HEAD moves to point at the latest commit on that branch.

Real Talk

HEAD is a reference to the current commit in your working directory. It typically points to the tip of the current branch. A 'detached HEAD' state occurs when HEAD points directly to a commit rather than a branch.

Show Me The Code

git log --oneline HEAD    # see where HEAD is
git reset HEAD~1          # move HEAD back one commit
git diff HEAD             # changes since current commit

When You'll Hear This

"Reset to HEAD." / "You're in detached HEAD state — checkout a branch."

Made with passive-aggressive love by manoga.digital. Powered by Claude.