Konubinix' opinionated web of thoughts

How to Fix Git Error: Object File Is Empty?

fleeting

How to fix Git error: object file is empty? - Stack Overflow

cd into the .git directory and run find . -type f -empty -delete -print to remove all empty files.

https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty

After deleting all of the empty files, I eventually came to git fsck actually running

https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty

So now we need to point HEAD to

https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty

a (now outdated) index file (source). So I killed it and reset the repo.

https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty