Comment by franky47
3 months ago
One of the beauties of Git is that as long as you’ve created an object, it’s impossible to lose that work (short of nuking the .git directory).
Committing often is key. Precommit hooks (that take more than ~100ms) go against that.
If you orphan the object by not having anything point to it, it goes away when "git gc" is run. That happens automatically after about two weeks by default.
Even things like "git add" will create objects stored in the .git folder.
I have had git corruption problems on a raspberry pi sd card, usually I just had to reclone/abandon that folder
It honestly sounds like git is the least of your problems here...
yeah I can delete the .git folder and repull/add the remote origin, I had to do that again the other day. I'm not sure what it is, my SD card is a gold sandisk too not a cheapo.