You see the Git documentation saying things like
The branch must be fully merged in HEAD.
But what is Git HEAD
exac
I am also still figuring out the internals of git, and have figured out this so far:
Let's say the current branch is master.
% cat .git/HEAD
ref: refs/heads/master
% cat .git/refs/heads/master
f342e66eb1158247a98d74152a1b91543ece31b4
% git log --oneline
f342e66 (HEAD -> master,...) latest commit
fa99692 parent of latest commit
So my thinking is the HEAD file is a convenient way to track the latest commit, instead of remembering long hash values.