Last active
August 29, 2015 14:24
-
-
Save damoclark/d73ef8546b81bb0f4414 to your computer and use it in GitHub Desktop.
Show the origin of all git repos under the current working directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Call this script like so: | |
# $ cd <location of all your repos> | |
# $ find . -type d -name .git -printf "%h\0"|xargs -0 -n 1 git-remote-show-origin-all.sh 2>/dev/null | sort | |
#Ignore any vendor repos | |
echo "$1" | grep -q vendor && exit | |
cd "$1" | |
echo -n "$1," | |
git remote show origin |grep 'Push URL:'|sed -e 's/^.*Push URL: //' | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment