Un detached HEAD si verifica quando HEAD punta direttamente a un commit piuttosto che a un branch. È uno stato normale (non un errore) che accade quando controlli un commit, un tag o un commit remoto specifico — ma fare commit in questo stato rischia di perdere il lavoro, quindi comprenderlo è importante.
Cosa HEAD normalmente punta
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
