Last active
October 15, 2018 15:28
-
-
Save braitom/570f8d62a677748531b98d831fc2461a to your computer and use it in GitHub Desktop.
delete all merged branch
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 checkout master && git branch --merged | grep -v '*' | xargs -I % git branch -d % | |
or | |
$ git branch --merged | grep -vE '^\*|master$|develop$' | xargs -p -I % git branch -d % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment