I am developing applications for my company where we use a private git repo inside our company's network. I am able to work with our git projects both internally and externally through the use of multiple upstreams to the same host (but through different SSH ports), like so:
external ssh://user@externalhost.example.com:1234/var/git/project.git
origin ssh://user@internalhost.example.com/var/git/project.git
My submodules work only when I connect internally. Here's an example submodule upstream:
[submodule "common-code"]
path = common-code
url = ssh://user@internalhost.example.com:/var/git/common-code.git
Is there a way to manage multiple upstreams for submodules so that I can work with them both internally and external to my company network?
Note: I've found some old posts about this on SO but they didn't really resolve the OP's answer or were vague about how to do so.