how to get out of a "detached HEAD" in Git code example Example: git return from detached head git checkout <branchname>