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
Make a copy of your git dir in your local host and run git init
there once again. Push the project to a brand new reprository.
Your repository is corrupt. That means data is lost that cannot be recovered by git itself. If you have another clone of this repository, you can recover the objects from there, or make a new clone.
fatal: bad object HEAD
means the branch referenced from HEAD is pointing to a bad commit object, which can mean it's missing or corrupt.
From the output of git fsck
, you can see there are a few tree, blob and commit objects missing.
Note that using git itself is not enough to keep data safe. You still need to back it up in cases of corruption.