I use this to do a `git pull` on all of my folders inside of my "sites" folder:
#!/bin/bash
for i in /sites/*/.git; do ( echo $i; cd $i/..; git pull; ); done
#!/bin/bash
for i in /sites/*/.git; do ( echo $i; cd $i/..; git pull; ); done
https://myrepos.branchable.com/
For example I store all my repos beneath ~/Repos/ so I can update them all, checking out any missing ones with:
cd ~/Repos/
mr checkout
mr update