删除筛选出来的分支,比如fixed

git branch -D @(git branch | select-string  "fixed" | Foreach {$_.Line.Trim()})

 

除了master分支,其他都删除

git branch -D @(git branch | select-string -NotMatch "fixed" | Foreach {$_.Line.Trim()})

更多请看:https://dev.to/koscheyscrag/git-how-to-delete-all-branches-except-master-2pi0

posted on 2019-09-21 11:42  芝麻的西瓜  阅读(1122)  评论(0编辑  收藏  举报