Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.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_Continuous Integration - Fatal编程技术网

子模块的Git参考存储库

子模块的Git参考存储库,git,continuous-integration,Git,Continuous Integration,使用Git,可以使用缓存存储库来降低CI用例的带宽要求,如下所示: 如果没有子模块也可以做这样的事情吗?我甚至不确定它的界面会是什么样子,但我想我还是会问的。这不是对这个问题的直接回答,而是对这个问题的主要动机之一的回答 我发现在Jenkins内部,这种情况可以通过包含从多个回购中提取的内容的裸回购来处理-在高级子模块行为中: Specify a folder containing a repository that will be used by Git as a reference duri

使用Git,可以使用缓存存储库来降低CI用例的带宽要求,如下所示:


如果没有子模块也可以做这样的事情吗?我甚至不确定它的界面会是什么样子,但我想我还是会问的。

这不是对这个问题的直接回答,而是对这个问题的主要动机之一的回答

我发现在Jenkins内部,这种情况可以通过包含从多个回购中提取的内容的裸回购来处理-在
高级子模块行为中

Specify a folder containing a repository that will be used by Git as a reference during clone operations.
This option will be ignored if the folder is not available on the master or agent where the clone is being executed.
To prepare a reference folder with multiple subprojects, create a bare git repository and add all the remote urls then perform a fetch:


git init --bare
git remote add SubProject1 https://gitrepo.com/subproject1
git remote add SubProject2 https://gitrepo.com/subproject2
git fetch --all

cd-dir/with/submodule;git pull——引用_引用。
?这将代表一个恼人的命令式解决方案,它也将偏离嵌套回购的标准递归克隆方法。你说得对,总比什么都没有好。ThanksAlso
git子模块foreach'git pull--reference_reference/$name'