windows 下批量删除git 分支

论坛 期权论坛 脚本     
匿名技术用户   2020-12-28 13:56   17   0

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

转载于:https://www.cnblogs.com/zinan/p/11562193.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP