Skip to content

Instantly share code, notes, and snippets.

@andjc
Forked from dougalcampbell/gitzip.sh
Created March 23, 2023 11:44
Embed
What would you like to do?
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