Git fatal error: Couldn’t set refs/heads/master; cannot update HEAD ref

Dec 12, 2012 14:39 · 35 words · 1 minute read git

In case git is telling you this, you’ve probably lost your HEAD. At least for me this helped getting my head back 🙂

echo ref: refs/heads/master >.git/HEAD

Source: StackOverflow: Git ‘fatal: No such ref: HEAD’