I was working on a project and experienced hardware failure. I have about 30 commits I did not get to push before this happened. I recovered from the crash and checked my repo. I now get this error message from a git status
.
error: object file .git/objects/a8/f43fd5a872feda2a771e6a1ced1518f455d9f3 is empty
error: unable to find a8f43fd5a872feda2a771e6a1ced1518f455d9f3
error: object file .git/objects/a8/f43fd5a872feda2a771e6a1ced1518f455d9f3 is empty
fatal: loose object a8f43fd5a872feda2a771e6a1ced1518f455d9f3 (stored in .git/objects/a8/f43fd5a872feda2a771e6a1ced1518f455d9f3) is corrupt
How can I remove this empty object and not get an error message from the HEAD?
I tried manually removing the bad object, but got this error:
fatal: could not parse HEAD
Thank you in advance.