Created
December 22, 2015 04:31
-
-
Save cworks/0a7a5fef682689333dab to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
# zip all commits between an earlier commit and a later commit | |
# $1 earlier commit | |
# $2 later commit | |
# $3 name of zip archive | |
IFS=$'\n' | |
files=($(git diff --name-only $1 $2)) | |
git archive -o $3 $2 "${files[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment