git branch -vv | Select-String -Pattern ': gone]' | ForEach-Object{($_ -split "\s+")[1]} | %{ git branch -D $_ }
要想刪除存在本地又不存在服務端的分支,用以上 powershell 命令
-vv 查看分支對應遠端情況,篩選出 gone 的, 過濾出本地分支名稱, 然後依次 刪除。
git branch -vv | Select-String -Pattern ': gone]' | ForEach-Object{($_ -split "\s+")[1]} | %{ git branch -D $_ }
要想刪除存在本地又不存在服務端的分支,用以上 powershell 命令
-vv 查看分支對應遠端情況,篩選出 gone 的, 過濾出本地分支名稱, 然後依次 刪除。