Files
developer-roadmap/roadmaps/git-github/content/detached-head@0cLf7FiI9CX--UX45sm2f.md

664 B

Detached HEAD

A detached HEAD state occurs when HEAD points directly to a specific commit instead of a branch, typically after checking out a commit hash or tag. Any new commits made in this state aren't attached to a branch, so they can be lost once another branch is checked out unless a new branch is created to save them. This state is often used to inspect old commits without affecting the current branch.

Visit the following resources to learn more: