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

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’

#

Leave a Reply