Created
April 4, 2018 15:30
-
-
Save jonpierce/e442916c1bbee887f14b565f2c19d57d to your computer and use it in GitHub Desktop.
Perform a `git pull` on all repositories in the current directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BASE_DIR=$(pwd) | |
for git_dir in $(find . -name ".git" | cut -c 3-); do | |
repo_dir="${git_dir%/.git}" | |
echo "==========" | |
echo "Pulling ${repo_dir}..." | |
echo "==========" | |
cd "${repo_dir}" | |
git pull | |
echo "" | |
cd "${BASE_DIR}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment