Skip to content

Instantly share code, notes, and snippets.

@promisedlandt
Created August 9, 2011 16:37
Show Gist options
  • Save promisedlandt/1134518 to your computer and use it in GitHub Desktop.
Save promisedlandt/1134518 to your computer and use it in GitHub Desktop.
git - restore deleted file
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment