Created
August 20, 2018 19:16
-
-
Save mujahidk/856dd7ac5c96a5e414e5826943112397 to your computer and use it in GitHub Desktop.
Fetch all Git project repositories under a directory.
This file contains hidden or 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
for d in ./*/ ; do | |
( | |
echo "Processing directory '$d'"; | |
if [ -d "$d/.git" ]; then | |
cd "$d" && git fetch --all | |
else | |
echo " ** Not a Git repository!" | |
fi; | |
echo "Completed '$d'" | |
echo '-----------------------------' | |
echo '' | |
); | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment