Skip to content

Instantly share code, notes, and snippets.

@jamen
Last active May 19, 2020 22:22
Show Gist options
  • Save jamen/097c573a4476547a4c41f2bff90939ba to your computer and use it in GitHub Desktop.
Save jamen/097c573a4476547a4c41f2bff90939ba to your computer and use it in GitHub Desktop.
script to archive my repos
git archive --format=tar.gz -o ~/repos/attic/archives/$(date --date="@$(git log -1 --format=%ct)" +%Y)-$(basename $PWD).tar.gz --prefix=$(basename $PWD)/ master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment