I have several (about 10-15) Git repositories in a directory:
~/plugins/admin
~/plugins/editor
~/plugins/etc
Each have their own separate repository and remote server.
The problem is that to pull all the changes from all the repositories I have to:
cd ~/plugins/admin
git pull origin master
password: ********
cd ..
cd ~/plugins/editor
git pull origin master
password: ********
cd ..
cd ~/plugins/etc
git pull origin master
password: ********
cd ..
How can I setup either Git submodules to pull all the repositories with 1 command,
OR alternatively write a script for Windows, Linux and Mac (as I use all 3 operating systems) to effectively do the same thing. Keeping in mind that the repos can be on different branches and don't necessarily have a tracking branch setup.
Same notes:
bash-3.2$ git submodule add git@repoUrl:SubmoduleName.git existing/submodule/path
Adding existing repo at 'existing/submodule/path' to the index
when you're trying to add submodule from place where some git repo already exists this repo will be added in index.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With