Created
December 17, 2018 05:53
-
-
Save valarpirai/b160f62859ef531a91de573cf2e03e35 to your computer and use it in GitHub Desktop.
Iterate over the git repositories in current directory and do git 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
find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "pull() | |
{ | |
echo '--------- $(pwd)' | |
if [ -d \".git\" ]; then | |
echo '######### Start git pull' | |
git pull | |
else | |
echo '********* Not a git Repo **********' | |
fi | |
} | |
cd '{}' && pull" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment