A few days ago I had the need to recover a file deleted in a prior commit and was unable to find a way to do it. Anyone able to suggest how? Also any of the nice gui git tools provides OOB this capability?
Asked
Active
Viewed 102 times
1 Answers
2
You can checkout the file from the previous revision from where you deleted it. So, say the revision where it was deleted is rev some-rev:
git checkout some-rev~:path-to-file
That will leave the file on index ready to be committed.

eftshift0
- 26,375
- 3
- 36
- 60