Created
December 13, 2012 14:36
-
-
Save anonymous/4276737 to your computer and use it in GitHub Desktop.
Oneliners for deleting old merged branches
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 branch --merged origin/master | grep -v '\* master' | xargs -l1 git branch -d |
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 branch -r --merged origin/master | grep 'pablo/.*' | cut -d / -f 2 | grep -v 'master' | xargs -l1 -I {} git push pablo :{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another way is to install and use git-sweep ;)