Fix "detached HEAD" in Git The Problem My Git repository reports that it is in “detached HEAD state”.