As far as I know, one submodule has only one url, which is referenced in:
$ cat .gitmodules
[submodule "a"]
path = a
url = /home/moses/subtut/public/a/.git
[submodule "b"]
path = b
url = /home/moses/subtut/public/b/.git
- and in the config of the
.git
directory of the submodule
Meaning if that url is down, it may have to be changed in those two locations, but I have not tested that process.
Good comments from Gattster
git submodule sync.
According to the docs:
Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules.
This is useful when submodule URLs change upstream and you need to update your local repositories accordingly.
- "
git submodule sync
" synchronizes all submodules
- while "
git submodule sync -- A
" synchronizes submodule "A" only.
That being said, modifying .gitmodule
might be better done in isolation (i.e. in a branch) until those new url can be validated/published.