git fix local head detached from origin code example Example: head detached at origin/master git checkout master