Tuesday, October 1, 2013

Create a zip with files that was changes in the specific commit.

To create an archive that contains files changes in the specific commit you can use the following approach:

export COMMIT_HASH=1ae404a0cbe5
git archive -o ../$COMMIT_HASH.zip $COMMIT_HASH `git diff-tree --no-commit-id --name-only -r $COMMIT_HASH`

No comments:

Post a Comment