简体   繁体   English

Visual Studio Git解决方案项目疯狂

[英]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. 这是我考虑过的一些选择。

  1. 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代码时需要更多的协调。

  2. 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. 似乎可以并发跨多个项目同时进行,而不必进行太多同步,这会稍微容易一些。

  3. 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的新手,对我而言,这些似乎有些复杂)。

  4. 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: 您可以想到的一些问题是:

  1. Would change in one DB schema cause code to break in a project that is not directly dependent on it? 一个数据库模式的更改会导致代码在不直接依赖该项目的项目中中断吗? Or do they interact through APIs and this won't affect anything but the direct dependency? 还是它们通过API进行交互,除了直接依赖关系之外,什么都不会影响?
  2. Submodules make sense when the projects use each other like libraries, but want to continuously enhance the features from each other. 当项目像库一样互相使用时,子模块才有意义,但它们希望彼此之间不断增强功能。 Is this the situation you are in? 这是您的情况吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio解决方案与Git项目和TFS项目混合 - Visual studio solution mix with Git project and TFS project Visual Studio 2015中的默认Git Repo用于解决方案中的启动默认项目? - Default Git Repo in Visual Studio 2015 for startup default project in solution? Git Repo应该是Visual Studio中的解决方案级别还是项目级别 - Should Git Repo's be at the Solution Level or Project Level in Visual Studio 在新解决方案中使用现有项目并在 Visual Studio 中使用 git 分支 - Using existing project in a new solution and git branches in Visual Studio Git订户未在Visual Studio解决方案中创建新项目 - Git subscribers not creating new Project in Visual Studio solution 我如何处理 Git 中的 Visual Studio 解决方案和项目文件? - How I deal with Visual Studio solution and project files in Git? 为使用 Visual Studio 维护的 Web 项目寻找一个好的 GIT 解决方案 - Looking for a good GIT solution for Web Project maintained with Visual Studio Visual Studio 2017仅将多项目解决方案中的1个项目连接到Git存储库 - Visual Studio 2017 only connects 1 project in multi project solution to Git repo 如何将现有的 Visual Studio 解决方案从 TFVC 项目移动到 Azure DevOps 上的 Git 项目? - How to move an existing Visual Studio solution from TFVC project to Git project on Azure DevOps? 使用Git和Visual Studio结帐项目 - Checkout A Project With Git And Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM