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