November 13, 2020
How to use git to get a delete file.
git log
Once you know the commit id, you can run the following:
git show <commit_id>:<file> > <file>
In the example commit_id
will be c96abeb210c6fc324166bac376a9b0b00e955335
In the example file
will be app/controllers/example_controller.rb
git show c96abeb210c6fc324166bac376a9b0b00e955335:app/controllers/example_controller.rb > app/controllers/example_controller.rb