This question has already been answered:
What if there were changes, but I did not commit them. And I decided to delete the last 2 commits with the git reset --hard HEAD~2 command. Is it possible to somehow return the files that were before git reset ?
git adddo? - Nick Volynkin ♦git reflog. In the future, in order not to lose just so unsaved changes, delete them only with the help ofgit stash, the details in the question on the link above and here in this: How to return (roll back) to an earlier commit? - Nick Volynkin ♦