Created
November 30, 2017 11:36
-
-
Save AlexanderRD/dc9ebda16fa76a1477aa8101ecf518a2 to your computer and use it in GitHub Desktop.
Local dev gihub branch clean-up
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
#Only delete branches merged into their upstream origins | |
git branch | grep -v "master" | grep -v "release" | xargs -n 1 git branch -d | |
# Delete branch regardless of merge status | |
git branch | grep -v "master" | grep -v "release" | xargs -n 1 git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment