Change git submodule URL
··68 words·1 min
If the location (URL) of the submodule has changed, then you can simply:
Modify the .gitmodules file in the repo root to use the new URL.
Delete the submodule folder in the repo
$ rm -rf .git/modules/<submodule>
Delete the submodule folder in the working directory
$ rm -rf <submodule>
Run
$ git submodule sync
And run
$ git submodule update
More complete info can be found elsewhere:
https://stackoverflow.com/questions/913701/changing-remote-repository-for-a-git-submodule