Created
November 29, 2013 09:17
-
-
Save NicolasRitouet/7703303 to your computer and use it in GitHub Desktop.
Git multiple pull
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
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | |
done | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
find "$DIR" -type d -name .git \ | |
| xargs -n 1 dirname \ | |
| sort \ | |
| while read line; do echo $line && cd $line && git pull; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment