简体   繁体   English

TFVC 到 TF GIT 迁移:回购组织,包括多种解决方案和构建

[英]TFVC to TF GIT migration: repo organisation, incl multiple solutions and build

We are considering migrating from TFVC to GIT (probably hosted within TFS).我们正在考虑从 TFVC 迁移到 GIT(可能托管在 TFS 中)。

Main reason is the bad support for file movement, which makes larger refactorings a pain.主要原因是对文件移动的不良支持,这使得更大的重构变得痛苦。 Merging generally is rather poor, often asking for manual resolution even if just one side of the merge has been updated.合并通常相当糟糕,即使仅更新了合并的一侧,也经常要求手动解决。 Another bad fact is that we currently have several team projects, and would like to include (via source) some shared functionality, this seems hard to do when several team projects are involved.另一个不好的事实是我们目前有几个团队项目,并且希望包括(通过源代码)一些共享功能,当涉及多个团队项目时,这似乎很难做到。

What would be a good organisation for the GIT repo for TFS considering考虑到 TFS 的 GIT 存储库,什么是一个好的组织

  • we have multiple solutions (right now, spread over different team projects)我们有多种解决方案(现在,分布在不同的团队项目中)
  • we plan to have some shared code referenced in several solutions, for debugging in source format我们计划在几个解决方案中引用一些共享代码,以便以源格式进行调试
  • right now, we have many legacy feature branches and wanted to keep a main an dev branch for the major solutions (if that workflow is decent with GIT. In TFVC I noticed that the many branches clutter the source control.)现在,我们有许多遗留功能分支,并希望为主要解决方案保留一个主要的开发分支(如果该工作流程与 GIT 相得益彰。在 TFVC 中,我注意到许多分支使源代码控制变得混乱。)
  • build should work via build agent like before, also taking into account the shared project (changes there trigger a build)构建应该像以前一样通过构建代理工作,同时考虑到共享项目(那里的更改会触发构建)
  • history should be preserved历史应该被保留

We are using https://github.com/git-tfs/git-tfs for the migration so far, which seems reasonably good.到目前为止,我们正在使用https://github.com/git-tfs/git-tfs进行迁移,这似乎相当不错。 We don't care much for work items or similar.我们不太关心工作项目或类似的东西。

Please share your insight.请分享您的见解。 After some quick research I am wondering if it would be worth it, since it seems to be some work, amongst others deciding on a repo structure as well as setting up the build projects anew.经过一些快速研究后,我想知道这是否值得,因为这似乎是一些工作,其中包括决定回购结构以及重新设置构建项目。

The main difference is the centralized aspect of TVFS vs. the decentralized nature of Git, which means:主要区别在于 TVFS 的集中方面与 Git 的分散性质,这意味着:

  • Git repositories tends to be smaller and focused on one component Git 存储库往往更小并专注于一个组件
  • which TVFS can host multiple projects in one giant referential哪个 TVFS 可以在一个巨大的参考中托管多个项目

So make sure to split your Git repo resulting from a git-tfs export, in order to:因此,请确保拆分由 git-tfs 导出产生的 Git 存储库,以便:

  • have one Git repository per solution每个解决方案都有一个 Git 存储库
  • use submodules to include commons projects into your main Git repos使用子模块将公共项目包含到您的主 Git 存储库中

Depending on your build environment, that can include challenges, but with solutions .根据您的构建环境,这可能包括挑战,但有解决方案

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

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