एक detached HEAD तेव्हा होतो जेव्हा HEAD सरावास (branch) च्या ऐवजी थेट एक commit ला निर्देशित करतो. हे एक सामान्य स्थिती आहे (त्रुटी नाही) जी तेव्हा घडते जेव्हा तुम्ही एक विशिष्ट commit, tag, किंवा remote commit checkout करता — परंतु यामध्ये 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
