Last active
July 17, 2017 19:10
-
-
Save jonnymaceachern/e248ea3891686e6048889c07cbf95a21 to your computer and use it in GitHub Desktop.
Git find pre-existing file that was deleted and bring it back
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-list -n 1 HEAD -- <file_path> | |
git checkout <deleting_commit>^ -- <file_path> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment