简体   繁体   English

从TFS迁移到GIT,将共享项目迁移到nuget

[英]Migrating from TFS to GIT, Shared projects to nuget

I am working in a software team that consists of 4-5 developers working in a single TFS project. 我在一个软件团队工作,该团队由4-5名开发人员组成,他们在一个TFS项目中工作。 We are considering moving the entire codebase to GIT. 我们正在考虑将整个代码库迁移到GIT。 The codebase consists of about 50 visual studio (2013) solutions divided into about 300 projects. 代码库由大约50个visual studio(2013)解决方案组成,分为大约300个项目。 The preferred procedure of referencing another assembly in a project has been to add the project to the solution and so on. 在项目中引用另一个程序集的首选过程是将项目添加到解决方案中,依此类推。 I guess this is considered a bit messy, but it has its perks: 我想这被认为有点乱,但它有它的好处:

1: Given that the source code is updated to latest, the projects will always be updated with the latest when built. 1:鉴于源代码已更新为最新版本,项目将始终使用最新版本进行更新。

2: When a release branch is created, the complete picture of the sources state is stored, and it is easily possible to reproduce the release if (when) needed. 2:创建发布分支时,将存储源状态的完整图片,并且如果需要(何时),则可以轻松地重现发布。

When considering migrating to GIT, the easiest way would be to simply move all the solutions and projects, pretty much as is to a single GIT repo. 在考虑迁移到GIT时,最简单的方法是简单地移动所有解决方案和项目,就像单个GIT仓库一样。 This leads me to my first question. 这引出了我的第一个问题。

Will a collection of 50 or so solutions divided into 300 projects in a single GIT repo be hard to work with? 在一个GIT回购中,将50个左右的解决方案分成300个项目的集合难以使用吗? I am afraid to loose overview of the changes performed by each developer on a daily basis. 我害怕忽略每个开发人员每天所做更改的概述。

Another approach, and I think this is the correct way, is to step away from the shared projects regime and divide the codebase into logically divided parts with their own GIT repos. 另一种方法,我认为这是正确的方法,是远离共享项目制度,并将代码库划分为逻辑上划分的部分与他们自己的GIT回购。 (I would guess this would leave us with about 10-20 repos). (我猜这会给我们带来大约10-20个回购)。 To solve the referenced projects in this matter, we are considering using a local nuget-server. 为解决此问题中的引用项目,我们正在考虑使用本地nuget-server。

This leads me to my second (and last) question. 这引出了我的第二个(也是最后一个)问题。 Take a look at the perks mentioned above. 看看上面提到的津贴。 Can these features still be maintained? 这些功能仍然可以维护吗? Can we “auto-update” the nuget references in the working branch, but freeze them to a specific version on a release branch? 我们可以“自动更新”工作分支中的nuget引用,但是将它们冻结到发布分支上的特定版本吗?

I am afraid to loose overview of the changes performed by each developer on a daily basis. 我害怕忽略每个开发人员每天所做更改的概述。

No, you won't loose that overview, and can easily measure the contribution of one collaborator (like, for instance, in this answer ) 不,您不会忽略该概述,并且可以轻松衡量一个合作者的贡献(例如, 在此答案中

Can these features still be maintained? 这些功能仍然可以维护吗?

Yes: those 10-20 projects would be reunited within one parent repo, as submodules . 是的:这些10-20个项目将作为子模块在一个父级回购中重新组合。
And you can easily configure a submodule to follow a branch , like its master branch. 您可以轻松配置子模块以跟随分支 ,例如其master分支。
See more on that config at " Git submodules: Specify a branch/tag ", and git submodule . 有关该配置的详细信息,请参阅“ Git子模块:指定分支/标记 ”和git submodule

  • auto-update: 自动更新:

     git submodule update --remote --init --recursive 
  • freeze: 冻结:

     cd /parent/repo git add . git commit -m "Freeze all submodules SHA1" 

As mentioned by jessehouwing in the comments, Visual Studio 2013 and its native Git support doesn't include yet submodules. 正如jessehouwing在评论中所提到的,Visual Studio 2013及其原生Git支持不包括子模块。 It is highly requested though . 虽然这是非常要求的
The Git command-line remains available for those update/freeze steps using submodules. Git命令行仍可用于使用子模块的更新/冻结步骤。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM