Skip to content

Instantly share code, notes, and snippets.

@jackmcdade
Created August 26, 2012 22:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackmcdade/3484008 to your computer and use it in GitHub Desktop.
Save jackmcdade/3484008 to your computer and use it in GitHub Desktop.
Bash - archive to desktop
function zipit {
local filename=$1
if [ -z "$filename" ] ; then
filename=${PWD##*/}"-latest"
fi
git archive HEAD --format=zip > ~/Desktop/${filename}.zip
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment