Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Last active August 29, 2015 14:06
Show Gist options
  • Save daryltucker/18f076afd7fda58040f7 to your computer and use it in GitHub Desktop.
Save daryltucker/18f076afd7fda58040f7 to your computer and use it in GitHub Desktop.
Pull all git repositories within a specific directory.
#!/bin/bash
pwd=`pwd`
git_directory='/home/daryl/Projects/*'
for d in $git_directory;
do
echo $d
cd $d
git fetch --all
git pull --all
done
cd $pwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment