Created
October 30, 2018 13:32
-
-
Save jbharter/98dd2da8df50d151a361712634c7196a to your computer and use it in GitHub Desktop.
Do you have a bunch of git repositories in a directory, and want to get them all up to date in one fell swoop? There's a script for that.
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
#!/bin/bash | |
for d in */; | |
do | |
echo $d | |
cd $d | |
git fetch | |
git pull | |
if [ $? -ne 0 ]; | |
then | |
git stash | |
git pull | |
fi | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment