AI engineering glossary · Command line Git
What is Detached HEAD?
Detached HEAD: A state where the checked-out position is a specific commit rather than a branch. New commits made there belong to no branch and can be lost unless you create a branch for them.
Detached HEAD: an example
git checkout a1b2c3d puts you here; git switch -c rescue keeps any new commits you make.
Related terms
More Command line Git terms
Where you learn it
Detached HEAD is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.