[英]visual studio git solution project madness
So i'm trying to figure out how best to structure my git repositories with my .net web application projects and database projects while using git and am really struggling. 因此,我试图找出如何最好地在使用git的同时使用.net Web应用程序项目和数据库项目来构造git存储库,这确实很麻烦。
We are using feature branching workflow and continuous integration with dev and master main branches currently. 目前,我们正在使用功能分支工作流程,并与dev和master主分支进行持续集成。
So here's the scenario... say i have 6 projects.(3 web and 3 database) 所以这是方案...说我有6个项目。(3个Web和3个数据库)
websiteA (has queries to database1) websiteB (has queries to database2) websiteC (has queries to database1, database2, and database3) websiteA(对数据库1的查询)websiteB(对数据库2的查询)websiteC(对数据库1,database2和database3的查询)
database1 (references database2) database2 (references database1) database3 (references database1 and database2) 数据库1(引用数据库2)数据库2(引用数据库1)数据库3(引用数据库1和数据库2)
all projects are deployable independently although there are many times where they need to deploy together. 所有项目都可以独立部署,尽管很多时候它们需要一起部署。
(yes i know this is a mess and needs to be cleaned up). (是的,我知道这是一团糟,需要清理)。
My question is how would you structure the git repos. 我的问题是您将如何构建git仓库。 Here are a few options I have considered.
这是我考虑过的一些选择。
Git repo with solution for each? Git回购解决方案? seems like this would be more modular and less noisy in the repo but more coordination is needed when pushing db and web code.
似乎这将使仓库中的模块更加模块化,噪音更少,但是在推送数据库和Web代码时需要更多的协调。
one big git repo with all the projects in them? 一个包含所有项目的大型git回购? seems this is a bit easier to be able to work across multiple projects concurrently without having to synchronize so much.
似乎可以并发跨多个项目同时进行,而不必进行太多同步,这会稍微容易一些。
git sub modules or git subtree? git子模块或git子树? (worried about these as many of the developers are new to git and these seem to be a little more complicated to me).
(担心这些,因为许多开发人员是git的新手,对我而言,这些似乎有些复杂)。
other options? 其他选择? Any thoughts?
有什么想法吗? Appreciate your help.
感谢您的帮助。
I think that a big repository with all the projects is, at least for the moment, the way to go ( monorepositories ) 我认为,至少就目前而言,拥有所有项目的大型存储库是可行的方式( 单一存储库 )
Because : * easier to set up * easier to use, especially like you say, when all your users don't have a lot of git experience 因为:*易于设置*易于使用,尤其是当您说的时候,如果您的所有用户都没有很多git经验
Go with that and gain experience and extract submodules later if you see that's appropriate (and when developers are more experienced using git) 继续学习,并获得经验并在以后提取子模块(如果您认为合适的话)(并且当开发人员对使用git更有经验时)
I think having several repos or subtrees makes sense if the dependencies can only change during releases. 我认为,如果依赖项只能在发布期间更改,那么拥有多个存储库或子树是有意义的。 For example a python module depends on the builtins and other python modules but lives in its own repo because the dependencies only change during releases.
例如,一个python模块依赖于内建模块和其他python模块,但是存在于自己的仓库中,因为依赖关系仅在发行期间发生变化。
So I think the answer would need knowledge of how tightly coupled these systems are. 因此,我认为答案需要了解这些系统的紧密耦合程度。
Some questions you can think of are: 您可以想到的一些问题是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.