git status shows fatal: bad object HEAD

前端 未结 14 1358
醉酒成梦
醉酒成梦 2020-12-09 00:44

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

14条回答
  •  孤城傲影
    2020-12-09 01:13

    In my case the error came out of nowhere, but didn't let me push to the remote branch.

    git fetch origin
    

    And that solved it.

    I agree this may not solve the issue for everyone, but before trying a more complex approach give it a shot at this one, nothing to loose.

提交回复
热议问题