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
Simple and precise-
First of all, get a latest stable commit in which you have that file by -
git log
Say you find $commitid 1234567..., then
git checkout <$commitid> $fileName
This will restore the file version which was in that commit.