Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git添加远程输入子模块_Git_Git Submodules - Fatal编程技术网

git添加远程输入子模块

git添加远程输入子模块,git,git-submodules,Git,Git Submodules,.gitmodule文件具有子模块url和路径的列表,与此类似 [submodule ".vim/bundle/subRepo"] path = .vim/bundle/subRepo url = https://git.com/sub/repo 并且在core repo的.git/config中有远程设备列表 [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git@othe

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

[submodule ".vim/bundle/subRepo"]
    path = .vim/bundle/subRepo
    url = https://git.com/sub/repo
并且在core repo的.git/config中有远程设备列表

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@otherRepo.com
什么时候

我得到子模块

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

git remote add remoteAlias git://... 
在每个子模块中

git clone --recursive

如果您已经克隆。

我开始执行此命令


要将远程保存在.gitmotes文件中,但“git submodule update--init--recursive”用于递归拉取?否。拉取时,仅对该存储库执行操作。尝试
git子模块foreach--recursive git pull--rebase
。重基是可选的。
git clone --recursive
git submodule update --init --recursive