Skip to content

Instantly share code, notes, and snippets.

@carlohcs
Created May 16, 2022 12:43
Show Gist options
  • Save carlohcs/e43c8ed6127baa3914feb6d07183e688 to your computer and use it in GitHub Desktop.
Save carlohcs/e43c8ed6127baa3914feb6d07183e688 to your computer and use it in GitHub Desktop.
Update git repositories inside the current folder
#!/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