
This shell scripts recurses through all child folders to find any git repos and execute a command. In the example below we are executing git pull
on all repos inside the current folder.
for git_dir in $(find . -type d -name .git); do git -C $(dirname "$git_dir") pull; done
If you want to run a different command, just replace pull
above with any command you want.