Create tar archive of changed/added files in a git commit

The following command first gets the changed and added files of a git commit and then creates a tar archive of those changed files.

git show {{COMMIT_ID}} --name-status | grep -Ew '^M|A' | awk '{ print $2 }' | xargs tar czf usb-passthrough.tar.gz

Continue reading ยป