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!
git reset --hard
Yep, git keep the files for 30 days at the trash area
Whoa, thx for that, going to be life saver tomorrow.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.