Skip to content

Instantly share code, notes, and snippets.

@spizacode
Created March 1, 2010 16:14
Show Gist options
  • Select an option

  • Save spizacode/318495 to your computer and use it in GitHub Desktop.

Select an option

Save spizacode/318495 to your computer and use it in GitHub Desktop.
Archive bare git repos in tarballs.
#!/bin/sh
for i in `ls | grep .git`
do
"tar" "czf" "${i/.git/.tar.gz}" "$i"
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment