title: Zip latest committed changes only
body: <p>Git has the very handy <code>archive</code> command which allows me to make a copy of a particular commit in a .zip archive like so:</p>
  
  <pre><code>git archive -o ../latest.zip some-commit</code></pre>
  
  <p>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:</p>
  
  <pre><code>git diff --name-only previous-commit latest-commit | zip ../changes.zip -@</code></pre>
  
  <p>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?</p>