Posted on Leave a comment

Delete merged branches in git

[code]
git branch –merged <BRANCH> | grep -v "<BRANCH>" | xargs -n 1 git branch -D

git branch –merged | grep -v "master" | xargs -n 1 git branch -d
[/code]

don’t forget about sudo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.