Skip to content

Instantly share code, notes, and snippets.

@kireal
Created October 13, 2016 18:42
Show Gist options
  • Select an option

  • Save kireal/d9deefdd9906201194c1353bde10dfde to your computer and use it in GitHub Desktop.

Select an option

Save kireal/d9deefdd9906201194c1353bde10dfde to your computer and use it in GitHub Desktop.
Git restore deleted files
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