[Development] Managing branches of Qt's git modules

Thiago Macieira thiago.macieira at intel.com
Fri Sep 30 17:26:13 CEST 2016

On sexta-feira, 30 de setembro de 2016 11:39:20 PDT Sean Harmer wrote:
> So, what do people do to checkout all interesting modules to 5.7, 5.8,
> dev etc on Unix like systems and on Windows?
> On *nix systems I've been getting away with a simple bash for loop. But
> on windows I find this painful but maybe that's just my unfamiliarity
> with windows batch scripts.

You can use git submodule foreach in both cases: since git-submodule is, 
itself, a shell script, it will be able to run the same things in all OSes.

For example, to switch to dev, I might do:

git submodule foreach "git rev-parse origin/dev && \
	git rebase --onto origin/dev origin/5.8 || true"

Then check which ones may have failed to rebase. I only keep commits in qtbase 
and qtdeclarative, so it's easy to spot which ones failed.

PS: I only use one branch in each repository and it's called "master", and I 
only work with one Qt upstream branch at a time for about 6 months.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list