[英]How to remove old local Git branches on Windows?
I wanted to remove all my unneeded local Git branches, but this guide I found online uses Bash. 我想删除所有不需要的本地Git分支,但我在网上找到的这个指南使用了Bash。 What is a more Windows native approach?
什么是更原始的Windows原生方法?
使用select-string
替换grep
和PowerShell xargs
替换这对我xargs
,@( git branch -vv | select-string -Pattern 'origin/.*: gone]' | %{$_.toString().split(' ')[2].trim()} ) | %{&"git" "branch" "-d" $_}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.