head detached from origin/master code example Example 1: head detached at origin/master git checkout master Example 2: git return from detached head git checkout <branchname>