简体   繁体   English

VS 2013 + Git + Visual Studio Online +多个Repos在一个项目中

[英]VS 2013 + Git + Visual Studio Online + multiple Repos in one project

I have VS 2013 installed and linked up to a project in Visual Studio Team Services using git. 我安装了VS 2013并使用git链接到Visual Studio Team Services中的项目。 It's all working beautifully. 这一切都很美妙。

Now i want to add another solution to the Team Services project in a separate repo. 现在我想在一个单独的仓库中为Team Services项目添加另一个解决方案。 Team Services allows you to create multiple repos under one project but VS 2013 will only show Team Services work items about the repo which matches the project. Team Services允许您在一个项目下创建多个repos,但VS 2013将仅显示有关与项目匹配的repo的Team Services工作项。

I could create multiple projects in Team Services, but i wanted to have one project with multiple repos in it. 我可以在Team Services中创建多个项目,但我希望有一个项目包含多个repos。 We can work with the additional repos within the project but linking them to work items is so painful no one will do it. 我们可以在项目中使用额外的回购,但将它们链接到工作项是非常痛苦的,没有人会这样做。

Are there any third party tool which will help my developers link commits to work items for the additional repos within the project? 是否有任何第三方工具可以帮助我的开发人员将提交链接到项目中的其他回购项目的工作项目?

Also as a side question does anyone know of any settings to require someone to link the commit to a work item? 另外作为一个附带问题,是否有人知道要求某人将提交链接到工作项的任何设置?

Thank you 谢谢

Swapping between different Repo's in VS2013 should be nothing more than a click on the "Connect" icon at the top of Team Explorer: 在VS2013中不同的Repo之间交换只不过是点击Team Explorer顶部的“Connect”图标:

If Repos do not appear here, click Refresh . 如果此处未显示Repos,请单击“ 刷新”

团队Exporer

As you can see in my example, I have 3 git repos and 2 team projects (Test Agile is TFVC). 正如您在我的示例中所看到的,我有3个git repos和2个团队项目(Test Agile是TFVC)。

The second on "D" is my current one, and I only need to click "C" or "T" to change. “D”上的第二个是我当前的,我只需要点击“C”或“T”来改变。 The section in the middle is unrelated, but at the bottom you can also see my other local repos, not part of VS Team Services. 中间的部分是无关的,但在底部你也可以看到我的其他本地回购,而不是VS Team Services的一部分。

As for requiring a linked work item on check in, this is not possible in Git with Team Services, it is with TFVC. 至于在办理登机手续时需要一个链接的工作项,这在Git with Team Services中是不可能的,它与TFVC有关。 But think about how Git works, you are supposed to make many small local commits before you "push". 但想想Git是如何工作的,你应该在“推”之前做出许多小的本地提交。 People can re-base and squash commits before pushing for example, what would you do then? 例如,人们可以在推动之前重新建立并压缩提交,那么你会做什么?

Work items in Team Explorer are shown for the Team Project you are connected to, not the git repository that is currently 'active'. 团队资源管理器中的工作项显示为您连接到的团队项目,而不是当前“活动”的git存储库。

Also work items are unique across a Team Project Collection so it's possible to link a commit to any work item in any team project you have access to. 此外,工作项在Team Project Collection中是唯一的,因此可以将提交链接到您有权访问的任何团队项目中的任何工作项。

To link a commit to a work item, just prefix the work item id with a hash in the commit message (eg #1234). 要将提交链接到工作项,只需在工作项id中使用提交消息中的哈希作为前缀(例如#1234)。 Once you push to the Team Services git repository it will scan the commit message and establish the link. 一旦您推送到Team Services git存储库,它将扫描提交消息并建立链接。

If you forget to mention the work item number, you can always link it up manually via the web interface See How to link a work load item with a commited change? 如果您忘记提及工作项目编号,您始终可以通过Web界面手动链接它。请参阅如何将工作负载项目与提交的更改相关联? for more information. 欲获得更多信息。

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

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