[英]Git reference repository for submodules
使用 Git,可以使用缓存存储库来降低 CI 用例的带宽要求,如下所示: https://randyfay.com/content/reference-cache-repositories-speed-clones-git-clone-reference
除了子模块之外,是否可以这样做? 我什至不确定界面会是什么样子,但我想我还是会问。
这不是对问题的直接回答,而是对问题主要动机之一的回答。
我看到在 Jenkins 中,这种情况可以通过包含从多个存储库获取的内容的裸存储库来处理 - 在Advanced sub-modules behaviours
:
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.