Skip to content

Instantly share code, notes, and snippets.

@matijs
Created September 4, 2013 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matijs/6432834 to your computer and use it in GitHub Desktop.
Save matijs/6432834 to your computer and use it in GitHub Desktop.
git snippets
# list deleted files
git log --diff-filter=D --summary
# find last commit that affected a file
git rev-list -n 1 HEAD -- path/to/filename
# restore one specific deleted file
git checkout $hash~1 path/to/filename
# clone including submodules
git clone --recursive git://url.to/foo.git