Git submodule url changed

后端 未结 2 1248

I have a Git project which has a submodule. The url of the submodule was recently changed. I have changed the .gitmodules and config file to point to the new ur

2条回答
  •  清酒与你
    2020-11-29 12:22

    Yes, after editing .gitmodules, you should commit and push those changes, so the change becomes available to everyone. Otherwise, only your local submodule would point to the new URL and everyone else would still the old URL.

    However, you don't need to commit to change the URL locally, git will also switch to the new URL if you haven't committed the change.

提交回复
热议问题