OK this is kind of an edge case, but if you have a submodule and someone upstream changes it’s name, what should you do?
- First you probably want to change the location of the module, so you can now just do a
git mv old_name new_name
and it will be correct in your directory. - Then inside the submodule, you need to change the origin with
git remote remove origin
and then add the new locationgit remote add origin new_name
and then the git push should work. - It does look like the
.gitmodules
doesn’t update correctly , the submodule name is wrong as is the url, although the path is right. - Also the link in
.git/config
also appears wrong.
This seemed like the two work items. The git submodule init seems to work but it is not clear if is all working.
Overall, it is probably easier just to delete the submodule and start over.