Last Updated: February 25, 2016
·
850
· bainternet

Git Zip branch

So here is my little alias to share:

zip = "!zipArchive() { git archive --format zip --output $1 $2; }; zipArchive"

Usage:

git zip /path/to/outputflie.zip branchName

Ex:

git zip version1.zip master

Side tip : I actually use it in a post receive hook to generate an archived zip file for remote download.

Enjoy!