Skip to content

Instantly share code, notes, and snippets.

@dougalcampbell
Created May 27, 2011 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dougalcampbell/995238 to your computer and use it in GitHub Desktop.
Save dougalcampbell/995238 to your computer and use it in GitHub Desktop.
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"; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment