I have a project of which I am interested in breaking out portions as open-source. I\'ve set up nested git repositories main, one, two and three:
main/
├── on
I just came up with the idea to place the repository of the submodules exactly as a subdirectory of the superproject. That way, the project as a whole is only dependent on the one repository/ location that you set up (based on the answer from Chris).
E.g. Submodule one
would have as its main repository the location server:/path/to/your/main/one
(via git remote -v
in that dir).
That way the submodule
functionality (e.g. git submodule update --recursive
) is pointed to the right location as well since the URL of that module/repository points to ./one
(.gitmodules).