Remove all your local git branches but keep master

Sometimes after a sprint, all the remaining branches are just taking up space. 
Here's a small snippet to remove all your local branches in one go.
git branch | grep -v "master" | xargs git branch -D 

 

 
posted @ 2019-03-14 17:22  小草露露  阅读(132)  评论(0编辑  收藏  举报