re: 10 Common Git Problems and How to Fix Them VIEW POST

FULL DISCUSSION
 

One obscure trick that I've had to use a few times in the past is that until you prune objects from .git via git-gc or git-prune, they're still under .git. So if you git-add a file and accidentally git reset --hard, you can still recover it through some Git object database spelunking - even if you didn't commit!

 

Yep, git keep the files for 30 days at the trash area

 

Whoa, thx for that, going to be life saver tomorrow.

code of conduct - report abuse