Skip to content

Instantly share code, notes, and snippets.

@jonnymaceachern
Last active July 17, 2017 19:10
Show Gist options
  • Save jonnymaceachern/e248ea3891686e6048889c07cbf95a21 to your computer and use it in GitHub Desktop.
Save jonnymaceachern/e248ea3891686e6048889c07cbf95a21 to your computer and use it in GitHub Desktop.
Git find pre-existing file that was deleted and bring it back
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