Run git pull over all subdirectories [duplicate]

How can I update multiple git repositories from their shared parent’s directory without cd‘ing into each repo’s root directory? I have the following which are all separate git repositories (not submodules):

/plugins/cms
/plugins/admin
/plugins/chart

I want to update them all at once or at least simplify my current workflow:

cd ~/plugins/admin
git pull origin master
cd ../chart
git pull

etc.

16 Answers
16

Leave a Comment