Hi,
How can I run
git pull origin master
on all sub directories of a directory.
I.E.
I have
/plugins/cms
/plugins/admin
/plugins/chart
etc and I want to update them all at the same time.
(Im running debian linux)
Hi,
How can I run
git pull origin master
on all sub directories of a directory.
I.E.
I have
/plugins/cms
/plugins/admin
/plugins/chart
etc and I want to update them all at the same time.
(Im running debian linux)
This should happen automatically, so long as cms, admin and chart are all parts of the repository.
A likely issue is that each of these plugins is a git submodule.
Run git help submodule
for more information.
EDIT
For doing this in bash:
cd plugins
for f in cms admin chart
do
cd $f && git pull origin master && cd ..
done
If all of those directories are separate git repo, you should reference them as submodules.
That means your "origin" would be that remote repo 'plugins
' which only contains references to subrepos 'cms
', 'admin
', 'chart
'.
A git pull
followed by a git submodule update
would achieve what your are looking for.