git back from detached head code example Example: git return from detached head git checkout <branchname>