Remove all your local git branches except master

Simple way to clean up your repository if you have a lot of checked our branches.

git branch | grep -v "master" | xargs git branch -D 


Leave a Reply

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

Markdown is allowed in comments.