这是我的.gitmodules
:
[submodule "app/code/Fooman/GoogleAnalyticsPlus"]
path = app/code/Fooman/GoogleAnalyticsPlus
url = https://[email protected]/some_user/fooman_googleanalyticsplus.git
我需要将网址更改为https://github.com/Ethan3600/magento2-CronjobManager.git
所以我只是更改了它:
[submodule "app/code/Fooman/GoogleAnalyticsPlus"]
path = app/code/Fooman/GoogleAnalyticsPlus
url = https://github.com/Ethan3600/magento2-CronjobManager.git
然后我将文件添加到暂存区并进行提交:
git add .gitmodules
git commit -m "change url of submodule xy"
然后我执行了git submodule update --init
。但是,如果我转到app/code/Fooman/GoogleAnalyticsPlus
并显示遥控器,那么我仍然会收到https://[email protected]/some_user/fooman_googleanalyticsplus.git
更新URL后,您需要删除并重新同步子模块。