Skip to content

Instantly share code, notes, and snippets.

@spadin
Created July 11, 2013 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spadin/5979195 to your computer and use it in GitHub Desktop.
Save spadin/5979195 to your computer and use it in GitHub Desktop.
Create a zip archive of your current git branch.
[alias]
# Zip archive of current branch
# Usage: `git zip [filename]`, eg: `git zip ~/Desktop/source.zip`
zip = !sh -c 'git archive --format zip --output $1 `git rev-parse --symbolic-full-name --abbrev-ref HEAD`' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment