A detached HEAD akkor fordul elő, amikor a HEAD közvetlenül egy commitre mutat ahelyett, hogy egy brancsre mutatna. Ez egy normális állapot (nem hiba), amely akkor fordul elő, amikor egy specifikus commitot, taget vagy remote commitot checkout-olsz — de ebben a commitálás munkavesztés kockázatát hordozza, ezért fontos megérteni.
A HEAD normálisan mire mutat
NORMALLY: HEAD → a BRANCH (e.g. main) → a commit
→ when you commit, the branch pointer advances, and HEAD follows it
DETACHED: HEAD → directly to a COMMIT (not through a branch)
→ you're "not on any branch" — looking at a specific commit
