删除筛选出来的分支,比如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