[英]How to find local git repositories without remote origin?
本地 git 存儲庫通常在沒有遠程存儲庫的情況下開始。 如何找到所有尚未推送的回購協議(=沒有遠程源附加到它們)?
遞歸文件夾搜索很慢。
我通過 ripgrep 找到了一個快速的解決方案:
rg --files-without-match --hidden --glob '**/.git/config' remote
遞歸搜索不包含remote
的 all.git/config 文件(在 win10 上測試)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.