Last active
August 29, 2015 14:03
-
-
Save peterjwest/cdb9ec06240b84f3a628 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
| # Removes deleted branches on remote, locally deletes all merged branches which are not the current branch or master or develop | |
| git checkout develop && git fetch --prune && git branch --merged | grep -E -v "^((\* )|\s*(develop|master)$)" | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment