I am trying to change the remote on the submodule according to these instructions .
After modifying and saving .gitmodules , then running git submodule sync did not change my submodule, although my .git/config file was updated to match the new remote URL in .gitmodules .
I also tried git submodule sync --recursive and did rm -rf .git/modules/<mySubmodule> according to this rm -rf .git/modules/<mySubmodule> without any difference. Actually, by running the last command, git submodule sync again gives fatal: Not a git repository: ../.git/modules/<mySubmodule> . Any tips?
I initially added a submodule to the project via git submodule add git://<mySubmodule-url> according to git docs .
Edit
I even upgraded git via homebrew to v2.1.1, still nothing. I also tried starting from scratch, and even switching between two completely different submodules, but I still get the same results. In total:
$> mkdir myRepo $> cd myRepo myRepo$> git init . myRepo$> git submodule add https://<path/to/my/repo>.git myRepo$> vim .gitmodules
source share