🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Detached HEAD

In plain terms

A Git state where you're on a commit, not a branch.

Going deeper

Detached HEAD means your working state points directly at a commit rather than a branch, so new commits aren't on any branch. Edits there can be lost if unsaved.

Under the hood

Useful for inspecting old states; create a branch to keep any new commits made there.

Examples

Checking out old commits, git checkout <hash>, inspecting history.

Think of it like...

Like standing on a specific page with no bookmark, your notes there may get lost.

Feedback & Bug Report