Skip to content

Instantly share code, notes, and snippets.

@peterchaula
Created December 21, 2016 09:52
Show Gist options
  • Save peterchaula/3208cc8531c6e11e54ffffab710930af to your computer and use it in GitHub Desktop.
Save peterchaula/3208cc8531c6e11e54ffffab710930af to your computer and use it in GitHub Desktop.
Leave master as the only branch
!#/bin/sh
git checkout master; \
git remote prune origin; \
for i in `git branch`; do
echo $i;
git branch -D $i;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment