👌

特定フォルダのサブフォルダに複数の git リポジトリがある状態でリモートの URL を列挙する

2023/04/08に公開

特定フォルダのサブフォルダに複数の git リポジトリがある状態でリモートの URL を列挙する

.git/config ファイルの remote "origin" セクションに url = xxx という値があるので
find で config ファイルを列挙して xargs とともに grep する。

find -name config -type f -print0 | xargs -0 grep -h "url ="  | sort | uniq

Discussion