Created
February 29, 2012 14:20
-
-
Save larsxschneider/1941174 to your computer and use it in GitHub Desktop.
Remove all merged branches on a Github
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
git fetch | git branch --merged | grep -v " master" | grep -v "* " | xargs -n 1 -I {} sh -c 'echo "Deleting" {}; git branch -d {}; git push --delete origin {}; git branch -dr {}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment