You ran `git checkout <hash>` to look at an old version, then 'just made a quick fix' and committed. Now Git warns about leaving the commit behind.
Detached HEAD commits are orphans until you branch from them.
Medium · 3 steps · +500 XP
This scenario walks through 3 steps, in order:
Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.
git checkout dd00001git switch -c rescue-branchgit log --onelineAlways `git switch -c <name>` before committing in detached HEAD.