Git

You are in 'detached HEAD' state

Detached HEAD State

HEAD points to a specific commit rather than a branch. Commits made here won't be on any branch.

Common Causes

Fixes

  1. 1. Create branch to keep work
    git checkout -b new-branch-name
  2. 2. Return to branch
    git checkout main
  3. 3. Discard and switch
    git checkout -f main

Still not fixed?

Related Errors

DuskTools That Might Help

All Errors