4 ms·
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
by bazillion 9y ago
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
- stevekemp 9y agoTake a look at `mr` which allows you to script updating/checking out/etc on a large number of git, mercurial, and other repositories: https://myrepos.branchable.com/ 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