Skip to content

Instantly share code, notes, and snippets.

@alexandrehuat
Created March 20, 2020 22:24
Show Gist options
  • Save alexandrehuat/83e08d8a146f567508cf54eee8fdd764 to your computer and use it in GitHub Desktop.
Save alexandrehuat/83e08d8a146f567508cf54eee8fdd764 to your computer and use it in GitHub Desktop.
Update all the repositories in the current directory
for dir in $(ls); do
if [ -d $dir ]; then
cd $dir
if [ -d .git ]
then
echo "================================================================"
echo "Project: $dir"
git pull --rebase
fi
cd ..
fi
done
echo "================================================================"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment