Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git archive one latest commit
one commit - zip archive.zip $(git diff-tree --no-commit-id --name-only -r commit-id)
diff between commits - git diff old-commit-id new-commit-id --name-only | xargs tar -zcvf update.tar.gz
diff between commits - zip archive.zip $(git diff old-commit-id new-commit-id --name-only)
diff between commits (windows/unix) - git archive --format=zip --output=files.zip HEAD $(git diff old-commit-id new-commit-id --name-only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment