Last Updated: February 25, 2016
·
491
· ccurtisj

Git- Script to cleanup all merged local branches

Sometimes you forget to cleanup your old branches. Here's a quick command to delete all local branches that have been merged into master:

git branch --merged master | grep -v 'master$' | xargs git branch -d

thanks stack overflow