Skip to content

Instantly share code, notes, and snippets.

@rfde
Last active December 20, 2017 12:56
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 rfde/cb2eb70e98484f58acbbb327b4f6cbf7 to your computer and use it in GitHub Desktop.
Save rfde/cb2eb70e98484f58acbbb327b4f6cbf7 to your computer and use it in GitHub Desktop.
Pull all git repositories located in subdirectories
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
for i in ${DIR}/*/.git
do
echo $i
cd $i/..
git pull
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment