Skip to content

Instantly share code, notes, and snippets.

@codatory
Created January 25, 2012 21:29
Show Gist options
  • Save codatory/1678839 to your computer and use it in GitHub Desktop.
Save codatory/1678839 to your computer and use it in GitHub Desktop.
CURRENT=`pwd`
mkdir /tmp/repo_archive
cd /tmp/repo_archive
git clone --quiet --bare "$CURRENT" repository
tar -c repository | pigz --best > "$CURRENT/archive.tar.gz"
cd $CURRENT
rm -rf /tmp/repo_archive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment