For me, one of the git objects was corrupted (probably after one system crash). To identify problems at the beginning of the git-fsck repo ( https://git-scm.com/docs/git-fsck ), this will show problems with the object tree in your repository.
Unfortunately, I do not know how easy it is to fix it. For my part, the easiest way is to clone the original repo to some temporary place, and then completely replace (delete the old, add a new) .git directory in my damaged one.
, but be careful: you will lose your local unset commits (but the working tree will still be beautiful, so it will look after git reset --mixed ), index, local repository configuration, stashes. You can probably try replacing (itโs better to completely remove and add) only the .git/objects directory, in which case you can save your index and local configuration (but not pressed changes and entries).
source share