Created
December 5, 2015 09:32
-
-
Save nishinoshake/b97b8ffcac7d5bd5f7ff to your computer and use it in GitHub Desktop.
gitのコミット差分をアーカイブ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$2" = "" ]; then | |
git archive --format=zip --prefix=archive/ HEAD `git diff --name-only HEAD $1` | tar xf - -C ~/Downloads/ | |
else | |
git archive --format=zip --prefix=archive/ $1 `git diff --name-only $1 $2` | tar xf - -C ~/Downloads/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment