Created
February 8, 2013 20:43
-
-
Save nyarly/4741783 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for branch in $(git branch --merged | egrep -v '(master)|(staging)|(production)'); do | |
echo Cleaning: $branch | |
#If we can delete the branch remotely, delete it locally | |
git push origin :$branch && git branch -d $branch | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment