From: Oleg Broytman Date: Sun, 5 Jun 2016 11:14:26 +0000 (+0300) Subject: Add scripts to list/show remotes X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=c7ed23ef5cec0b238d7180a49f5369cfeabf061a;p=git-scripts.git Add scripts to list/show remotes --- diff --git a/ls-remotes b/ls-remotes new file mode 100755 index 0000000..5371f6f --- /dev/null +++ b/ls-remotes @@ -0,0 +1,10 @@ +#! /bin/sh + +if [ "$1" = "-v" ]; then + verbose="--verbose" +fi +export verbose + +exec "`dirname \"$0\"`"/do-all \ + 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ + 'echo "----- $d -----"; git remote $verbose' diff --git a/show-remotes b/show-remotes new file mode 100755 index 0000000..1e7a8ee --- /dev/null +++ b/show-remotes @@ -0,0 +1,10 @@ +#! /bin/sh + +if [ "$1" = "-v" ]; then + verbose="--verbose" +fi +export verbose + +exec "`dirname \"$0\"`"/do-all \ + 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ + 'echo "----- $d -----"; git remote | xargs -n1 git remote show' diff --git a/show-remotes-not-synced b/show-remotes-not-synced new file mode 100755 index 0000000..be4a404 --- /dev/null +++ b/show-remotes-not-synced @@ -0,0 +1,12 @@ +#! /bin/sh + +if [ "$1" = "-v" ]; then + verbose="--verbose" +fi +export verbose + +exec "`dirname \"$0\"`"/do-all \ + 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ + 'not_up="`git remote | xargs -n1 git remote show | ' \ + 'grep -F \" pushes to \" | grep -Fv \"(up to date)\"`" &&' \ + 'test -n "$not_up" && echo "----- $d -----"'