git branch

开发一段时间后发现本地有很多已经合并了的分支,但是一个一个删除又很麻烦,写个脚本把develop以外的全删了

show all branch beside master

1
git branch | grep -v "develop"

delete all

1
git branch | grep -v "develop" | xargs git branch -d