Skip to content

Instantly share code, notes, and snippets.

@ChickenFur
ChickenFur / git-diff-commands.md
Created December 11, 2013 18:57
These two commands creates a tar file of all the changed files and a txt file with a list of the changed files.

git diff --name-only HEAD~1 HEAD | xargs tar -czf files.tar.gz

git diff --name-only HEAD~1 HEAD | > files.txt

#to get the hash of the current commit

git rev-parse HEAD