Multiple urls of git submodule – per remote submodules

It seems you can use relative URLs for submodules. From git help submodules:




<repository> is the URL of the new submodule’s origin repository. This may be either an absolute URL, or (if it begins with ./ or ../), the location relative to the superproject’s origin repository

So, if you follow the same naming convention in both sites (ie,,, and, you should be able to set the submodule like this:

[submodule "programs/mgr-nancy-demo"]
    path = programs/mgr-nancy-demo
    url = ../mgr-nancy-demo.git

Test it – YMMV!

Leave a Comment