Skip to content

Instantly share code, notes, and snippets.

@dougalcampbell
dougalcampbell / gitzip.sh
Created May 27, 2011 13:25
gitzip -- create a zip file of a git project
#!/bin/bash
##
## I usually put this in my .bashrc
##
## When in a git project dir, run 'gitzip foo' to get a 'foo.zip' in the parent
## directory.
gitzip() { git archive HEAD --format=zip --prefix="$*/" > ../"$*.zip"; }