એક detached HEAD ત્યારે થાય છે જ્યારે HEAD સીધાં એક commit ને નિર્દેશ કરે છે અને બ્રાંચને નહીં. તે એક સામાન્ય સ્થિતી છે (ભૂલ નથી) જે ત્યારે થાય છે જ્યારે તમે ચોક્કસ commit, tag, અથવા દૂર commit ને ચેક આઉટ કરો છો — પરંતુ તેમાં commit કરવાનું કામ કરવાનો ઝોખમ ધરાવે છે, તેથી તેને સમજવું મહત્વપૂર્ણ છે.
HEAD સામાન્ય રીતે શું નિર્દેશ કરે છે
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
