Say I\'m in a Git repository. I delete a file and commit that change. I continue working and make some more commits. Then, I find I need to restore that file.
I know
For the best way to do that, try it.
First, find the commit id of the commit that deleted your file. It will give you a summary of commits which deleted files.
git log --diff-filter=D --summary
git checkout 84sdhfddbffffdf~1
Note: 84sdhfddbffffd
is your commit id
Through this you can easily recover all deleted files.