Skip to content

Instantly share code, notes, and snippets.

@chrisl8888
Created July 24, 2012 19:32
Show Gist options
  • Save chrisl8888/3172113 to your computer and use it in GitHub Desktop.
Save chrisl8888/3172113 to your computer and use it in GitHub Desktop.
Git archive and label it by Y/M/D
#!/bin/bash
# create an archive of your git repository
# this method is better than just zipping your repo because
# it will respect your .gitignore file
git archive HEAD --format=zip > latest-$(date +%Y%m%d).zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment