How to do this for all projects in the catalog?
One way would be (experiment in a separate local directory):
- create a local repo in this directory
- add all these Git repos projects as submodules (git add subodule -b dev url / git / repo / for / a / project): they will be configured to track the dev branch
- every day (for example, with the cron task), do
git submodule update --recursive --remote : this will git submodule update --recursive --remote and check the last from origin / dev for each submodule.
Note that the local repo in the directory acts as the βparent repoβ for these submodules and is purely local: you do not need to push this repo. This is where you can use the submodule tracking feature introduced in Git 1.8.2+ (March 2013).
Your Git project repositories may completely ignore the fact that they are submodules for the parent directory repository.
In one command, you run fetch + checkout of the latest origin/dev for all of your Git projects.
source share