tfs - 用git管理多项目引用的大项目最好的方式是什么呢?
滿天的星座
滿天的星座 2017-05-02 09:24:56
0
4
628

我们有一些大项目,以前一直用的TFS管理,现在需要转移到git来使用。
但是转移的过程中遇到一些问题。
比如,在TFS里面,我们有一个核心项目,其他很多项目都会引用这个核心项目。在GIT里面,每个项目就是一个repo,所以repo之间如何互相引用呢?
我画了一个示意图:

我试过submodule和subtree,他们都会在主项目的repo下拷贝一份引用的项目的代码,这样代码就会有很多份。GIT有没有一种方式能像TFS一样,无论多少个项目互相引用,都只有一份代码,而且很好维护?

目前我们的项目结构大概是这样的:

如果用GIT,那么product_core的代码就会被拷贝很多份。有没有会自动引用项目且不会拷贝多份代码的解决方案呢?

滿天的星座
滿天的星座

reply all(4)
阿神

If it is a java project, it is recommended to use Maven或者gradle管理项目依赖,再用git管理项目工程。当然MavengradleIt can also manage non-java projects.

After some searching, this question is similar to the title:
http://programmers.stackexchange.com/questions/114719/organizing-git-repositories-with-common-nested-sub-modules

阿神

My understanding is that your various modules are coupled together. But sometimes it's unavoidable.

Public components or code should be changed as little as possible. Modular, it is not recommended to reduce multiple projects into one project

To manage. Many languages ​​now have their own third-party components, and these plug-ins also use git alone

Management, release a stable version, and update it in the project when the components are updated in the future.

给我你的怀抱

I understand that your core is equivalent to a basic project. Why should this reference relationship be maintained at the source code level? The project source code should be relatively independent. What is the purpose of being coupled together like this?
Isn’t maven used to do this job? Why must it be quoted at the source code level?

伊谢尔伦

Split it into independent applications. Your multi-branch development structure will soon be broken into pieces

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template