Comment by franky47

Comment by franky47 a year ago

4 replies

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.

extraduder_ire a year ago

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.

ge96 a year ago

I have had git corruption problems on a raspberry pi sd card, usually I just had to reclone/abandon that folder

  • stephen_g a year ago

    It honestly sounds like git is the least of your problems here...

    • ge96 a year ago

      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.