Remove old and merged Git branches easily

Run this one-liner to remove local Git branches that have been merged back into master.

git branch --merged | grep -v '\*\|master\|develop' | xargs -n 1 git branch -d

Source

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.