Git has the very handy archive
command which allows me to make a copy of a particular commit in a .zip archive like so:
git archive -o ../latest.zip some-commit
This will contain the entire working tree for that commit. Usually I just need the changed files since a previous release. Currently I use this to get those files into a zip:
git diff --name-only previous-commit latest-commit | zip ../changes.zip -@
This will however zip files from my working copy, which may have uncommitted changes. Is there some way to get only the changed files as they were committed directly into a zip?