I have a problem with git on Windows Azure. Git status shows - \"fatal: bad object HEAD\" and I tried running:
git fsck --full git gc
But
I solved this by renaming the branch in the file .git/refs/remotes/origin/HEAD.
.git/refs/remotes/origin/HEAD