Skip to content

Instantly share code, notes, and snippets.

@delenamalan
Created August 21, 2017 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delenamalan/515bedc37a8ebcbf86ca40dc1371cedc to your computer and use it in GitHub Desktop.
Save delenamalan/515bedc37a8ebcbf86ca40dc1371cedc to your computer and use it in GitHub Desktop.
Update and rebase all repositories in a folder
#!/bin/bash
for f in */
do
echo "Processing $f ..."
cd $f || continue
if [ -d .git ]; then
git branch
git remote update
git rebase origin/master
fi;
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment