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

8 lines
664 B
Markdown

# 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:
- [@article@How to resolve detached HEAD state in Git](https://graphite.dev/guides/how-to-resolve-detached-head-state-in-git)
- [@video@Head & Detached Head](https://www.youtube.com/watch?v=HvDjbAa9ZsY)