Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mahbub-shohag/25121892951ccab09ac00040901b6c47 to your computer and use it in GitHub Desktop.
Save mahbub-shohag/25121892951ccab09ac00040901b6c47 to your computer and use it in GitHub Desktop.
#Use git log --diff-filter=D --summary to get all the commits which have deleted files and the files deleted;
#Use git checkout $commit~1 filename to restore the deleted file.
Where $commit is the value of the commit you've found at step 1, e.g. e4cf499627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment