I've been using Git for a couple years now, and I don't think I've ever lost any work.
Even if you do `git reset --hard HEAD~5`, "throwing away" your last few commits, they aren't actually discarded yet. You can do `git reflog` to see them and then `git checkout -b some_commit_hash` to recover one to a branch, or `git reset --hard some_commit-hash` to set this branch back to that point.
Only if those commits stay orphaned for a while (a week or two?) will Git truly discard them.
Even if you do `git reset --hard HEAD~5`, "throwing away" your last few commits, they aren't actually discarded yet. You can do `git reflog` to see them and then `git checkout -b some_commit_hash` to recover one to a branch, or `git reset --hard some_commit-hash` to set this branch back to that point.
Only if those commits stay orphaned for a while (a week or two?) will Git truly discard them.