Skip to content

Instantly share code, notes, and snippets.

@Pindar
Created July 28, 2015 09:07
Show Gist options
  • Save Pindar/a148a46801a923c5eba1 to your computer and use it in GitHub Desktop.
Save Pindar/a148a46801a923c5eba1 to your computer and use it in GitHub Desktop.
git commands
# restore file
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
# stage files with review
git add -p .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment