Delete already-merged branchs in Git

$ git branch --merged | egrep -v 'master|develop' | xargs -n 1 git branch -d


You can safelist more branches in egrep -v 'master|develop|foo|bar'

1.07 Thousand
Ali

Get our stories delivered

From us to your inbox weekly.