Create tar archive of changed/added files in a git commit
Thu 02 May 2013 | Last updated on Tue 06 December 2022The 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