Created
May 16, 2022 12:43
-
-
Save carlohcs/e43c8ed6127baa3914feb6d07183e688 to your computer and use it in GitHub Desktop.
Update git repositories inside the current folder
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
#!/bin/bash | |
currentFolder=$(pwd) | |
for folder in */; do | |
if [ "$folder" != "node_modules/" ]; then | |
echo "Updating folder ${folder}" | |
cd $folder | |
git fetch --all -p | |
git pull | |
cd .. | |
fi | |
done | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment