Created
November 1, 2017 20:40
-
-
Save Zoramite/453cd8dc800f8c9d02a0cccfb72a4a2f to your computer and use it in GitHub Desktop.
Remove merged branches in git.
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
# Removes all the merged branches, ignoring master and staging branches. | |
git branch --merged | grep -vE '^\*|master$|staging$' | xargs -I % git branch -d % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment