Skip to content

Instantly share code, notes, and snippets.

@mak3r
Created June 2, 2023 16:53
Show Gist options
  • Save mak3r/7147a20b0045da2794f341366d82db34 to your computer and use it in GitHub Desktop.
Save mak3r/7147a20b0045da2794f341366d82db34 to your computer and use it in GitHub Desktop.
get a list of remotes in git repos on the file system
#!/bin/sh
for f in $(ls -1); do
pushd $f;
echo -e "\n\n******" >> ~/dev/remotes.txt;
echo $f >> ~/dev/remotes.txt;
echo "******" >> ~/dev/remotes.txt;
git remote show origin >> ~/dev/remotes.txt 2>&1;
popd;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment