Last active
October 24, 2019 14:56
-
-
Save grimzy/f413a7b07273db26f8501b59c4740d46 to your computer and use it in GitHub Desktop.
Delete merged branches
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 -r --merged | grep -v 'master\|develop\|support/1.0.X\|support/1.1.X' | sed 's/origin\///' | xargs -n 1 git push --delete origin |
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 -r --merged | grep -v 'master\|develop\|support/1.0.X\|support/1.1.X' | sed 's/origin\///' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excluding branches:
master
,develop
,support/1.0.X
,support/1.1.X