git 在子模块中添加远程

2024-04-29

.gitmodule 文件有子模块 url 和路径的列表,与此类似

[submodule ".vim/bundle/subRepo"]
    path = .vim/bundle/subRepo
    url = https://git.com/sub/repo

并且在核心存储库的 .git/config 中有遥控器列表

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = [email protected] /cdn-cgi/l/email-protection

when

 git submodule init
 git submodule update

我得到了子模块。

如何在子模块中添加一次遥控器列表? 因为不是每次都写

git remote add remoteAlias git://... 

在每个子模块中


git clone --recursive

or

git submodule update --init --recursive

如果你已经克隆了。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

git 在子模块中添加远程 的相关文章

随机推荐