Skip to content

Instantly share code, notes, and snippets.

@partynight12th
partynight12th / git-diff-zip
Created October 22, 2012 05:44 — forked from func09/git-diff-zip.sh
Gitで特定のコミットからの差分ファイルだけ抜き出してZipにする
#!/bin/bash
if [ $# -ne 3 ]; then
echo "Usage: git diff-zip <archive_name> <oldCommit> <newCommit>"
exit 1
fi
git archive --format=zip --prefix=$1/ $3 `git diff --name-only $2 $3` -o ../$1.zip