Skip to content

Instantly share code, notes, and snippets.

@janschumann
Created February 27, 2014 22:05
Show Gist options
  • Save janschumann/9260598 to your computer and use it in GitHub Desktop.
Save janschumann/9260598 to your computer and use it in GitHub Desktop.
Remove all remote repos from local repo
for b in $(git branch -r); do
if test $b != "origin/HEAD" -a $b != "origin/master" -a $b != "->"; then
git branch -rd $b
fi;
done
git gc --aggressive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment