My Battery died on my macbook when pushing my repo.
Now I cannot run git status
$ git status
fatal: bad object HEAD
fatal: git status --porcelain failed
I've tried a few suggestions ive found for fixing bad object errors.
$ git fsck --full
dangling tree 65e856976b7aa7c73f15cd71defedb8a3d622a10
I've tried git prune
and git prune-packed
I can still commit, stash, push, it appears to be just affecting git status
Andy ideas?
Thanks
I guess you solved this problem already but i had this to and could fix it simply by run
git pull
This has resulted into a working condition. eventough your files are intact you should backup your local git directory and then run the git pull. after that you should be back in business.
If there are files deleted (it should not happen) you can copy them back over a working checkout and commit them from there.
If your .git/HEAD
is corrupted or points to a corrupted object, you can change it manually or by git checkout
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With