Skip to content

Instantly share code, notes, and snippets.

@flipace
Created November 25, 2019 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flipace/c0579d1b628d06391aca6dde7f5e267d to your computer and use it in GitHub Desktop.
Save flipace/c0579d1b628d06391aca6dde7f5e267d to your computer and use it in GitHub Desktop.
Check all git remotes
#!/bin/bash
checkremote() {
dir=$(pwd)
echo "Looking for git folders in ${dir} and below. Ignoring node_modules."
results=$(find $dir -not -path "*node_modules*" -not -path ".git/*" -name .git -type d);
for f in $results; do
(cd $f/..; echo ""; echo "$f:"; git remote -v;)
done
}
checkremote;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment