当前设置:
目前我有另外13个项目。每一次,如果我必须在另一台机器上安装,那么我必须克隆每个项目单独。另外,我还为自动构建做了Jenkin管道设置。
寻找
我想过的解决办法:
上述解决方案面临的问题
1. Maven Child projects
--> If we are using maven child projects then we are literally copying the sub projects in pom/main project.
In this case i cannot reuse the project. Every time i have to clone the project to use it.
For big project with number of team member working, merging issue will come.
2. Git Sub modules
--> This is best solution for me but when we create sub module it always point to commit not the head revision.
Every time i have to manually pull the latest code push it to parent project.
This approach we can not use in Jenkins.是否有解决所有问题的最佳办法。
发布于 2019-07-16 09:27:05
您可以通过指定要从其他存储库添加哪些模块来添加git子模块。根上将创建一个.gitmodules文件,该文件将包含所有子模块的列表和您的其他首选项。
您可以使用一组命令来同步git模块及其所有子模块。
您可以采取的步骤如下:
git submodule add [ssh or https path]添加项目中的所有子模块,例如git submodule add https://github.com/testgit submodule init
git submodule update或者运行git clone --recurse-submodules https://github.com/chaconinc/MainProject也可以获得子模块。
我建议您阅读这链接,并确保您的需求得到了满足。
https://stackoverflow.com/questions/57052536
复制相似问题