Hacker News new | ask | show | jobs
by bazillion 3274 days 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

1 comments

Take 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/

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