Delete all remote merged branches
This works relative to the branch you are on.
git branch -r --merged | grep -v <branch you don't want removed ie dev or master> | sed 's/origin\//:/' | xargs git push <remote name>
You can do grep -v multiple times to remove unwanted branch deletions.
Written by Amos King
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#