Skip to content

Instantly share code, notes, and snippets.

@delor
Last active August 29, 2015 13:55
Show Gist options
  • Save delor/8727755 to your computer and use it in GitHub Desktop.
Save delor/8727755 to your computer and use it in GitHub Desktop.
list of rarely used commands in git

add changes without whitespace

git diff -w --no-color | git apply --cached --ignore-whitespace

find deleted file

$ git log -- /path/to/file

display deleted file

git show <SHA> -- /path/to/file

recover file

git checkout <SHA> -- /path/to/file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment