Created
July 8, 2015 04:38
-
-
Save simsicon/5eaf04b9c3db0ba342cb to your computer and use it in GitHub Desktop.
Remove merged branch
This file contains hidden or 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 master | grep -v "\* master" | grep -v "develop" | xargs -n 1 git branch -d | |
git branch -r --merged master | grep -v ">" | grep -v "develop" | grep -v "master" | sed 's/ *origin\///' | xargs -n 1 git push origin --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment