Un HEAD détaché se produit lorsque HEAD pointe directement sur un commit plutôt que sur une branche. C'est un état normal (pas une erreur) qui se produit lorsque vous récupérez un commit spécifique, une étiquette ou un commit distant — mais commiter dans cet état risque de perdre du travail, donc le comprendre est important.
Vers quoi HEAD pointe normalement
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
