Skip to content

Instantly share code, notes, and snippets.

@anthonygore
Created November 9, 2020 02:31
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 anthonygore/5543007170738b2b93123e7747658b5c to your computer and use it in GitHub Desktop.
Save anthonygore/5543007170738b2b93123e7747658b5c to your computer and use it in GitHub Desktop.
Bash script to print out the git remote of every subdirectory in the folder
find . -maxdepth 1 -mindepth 1 -type d | while read dir; do
if [ -e $dir/.git ];
then
git -C $dir remote -v
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment