Batch Update Multiple Git Repositories

This is a small shell script I use to batch update all of my git repositories that are children of a particular folder on my filesystem.

First create a single common folder to checkout all of your projects.  We’ll use vc.

mkdir ~/vc; cd ~/vc

Then place the following file inside the folder.

Now checkout your repositories into subfolder.

git clone https://github.com/stevenkword/WP-Present.git wp-present

You should now end up with a folder ~/vc/wp-present/ and we can test our update script.

sh ~/vc/update-git.sh

The script should traverse all of the subfolders and issue git pull commands in each.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: