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.
replies(2):
Committing often is key. Precommit hooks (that take more than ~100ms) go against that.
Even things like "git add" will create objects stored in the .git folder.