After committing changes, I ran git reset --hard HEAD^ mistakenly and it caused me to lose the files in that committed changes.
I am trying to recover these files.
When I do git reflog it shows that previous commit, thatCommit, so I then proceed with:
git checkout thatCommit
However, none of the files are restored.
When I then type git checkout it prints out all the files that have been deleted:
D path/to/deletedFile1 D path/to/deletedFile2 M path/to/changedFile1 M path/to/changedFile2 I'd like the deleted files and changed files to be restored, but I cannot see path/to/deletedFile1 in my repo/branch.
How can I recover these files?