Delete merged branches

git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d
Code language: Shell Session (shell)

Leave a Reply

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