Skip to content

Instantly share code, notes, and snippets.

@peat
Last active December 18, 2015 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peat/5851531 to your computer and use it in GitHub Desktop.
Save peat/5851531 to your computer and use it in GitHub Desktop.
A simple shell script to pull updates for all of your repos.
#!/bin/sh
#
# Pulls updates for your repos, including registered submodules.
#
# Put this file in the directory containing all yer git repos.
GITS=`find . -type d -name .git`
START=`pwd`
for i in $GITS; do
REPO=`dirname $i`;
echo "\n=> Updating $REPO ..."
cd $REPO;
git pull
git submodule update
cd $START
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment