Created
March 29, 2016 11:43
-
-
Save wrzlbrmft/ac2354d4a9a3c5349609 to your computer and use it in GitHub Desktop.
Do a git pull and status in all direct subdirectories being Git repos.
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 sh | |
_IFS="$IFS" | |
IFS=$'\n' | |
for i in $(find . -mindepth 1 -maxdepth 1 -type d | sort); do | |
if [ -d "$i/.git" ]; then | |
printf "$i: " | |
cd "$i" | |
git fetch | |
git pull | |
git status --short | |
cd .. | |
fi | |
done | |
IFS="$_IFS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment