Skip to content

Instantly share code, notes, and snippets.

@ivamluz
Last active August 29, 2015 14:07
Show Gist options
  • Save ivamluz/2cf5978bf4f5295a5bde to your computer and use it in GitHub Desktop.
Save ivamluz/2cf5978bf4f5295a5bde to your computer and use it in GitHub Desktop.
Shell script for updating all git repositories under the current directory
#/bin/bash
BASE_DIR=`pwd`
for D in $(find . -mindepth 1 -maxdepth 1 -type d) ; do
cd $BASE_DIR/$D;
echo "Updating git repository at $D"
git pull
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment