Even with --hard, the commit isn't lost. Commits are not immediately removed from the repository, only when git runs the garbage collection. Try it: create a test commit, make a note of its hash, reset to HEAD~1 and then reset again to that hash.
When you do this by mistake and you don't know the hash you can find it using git reflog, which logs everything that happens in the repository.