TFS反向集成回到主要 [英] TFS reverse integration back to main

查看:73
本文介绍了TFS反向集成回到主要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Main分支派生了Development分支。

I have the Development branch forked from the Main branch.

我可以将Development分支合并回Main以便Main分支代码与Development分支相等

Could I merge the Development branch back to the Main so that Main branch code would be equal the Development branch?

最安全,最可靠的解决方案是什么?

What is the most safe and reliable solution for this?

推荐答案

我发现最简单的方法是使用Visual Studio和Source Control Explorer进行合并。

The easiest way I've found to do this is to do a merge using Visual Studio and the Source Control Explorer.

在Source Control Explorer中,右键单击在您的开发分支上,然后选择分支和合并>合并

In the Source Control Explorer, right-click on your development branch and select Branching and Merging > Merge

目标分支下拉列表中选择您的主干(主)作为目的地。如果您最初是从Main分支出来的,则这可能是默认选择。

In the Target Branch drop-down select your trunk ("Main") as the destination. This is likely the default selection if you've branched from Main originally.

有两个选项:


  1. 所有更改直至特定版本:您根据一个修订版本进行选择,并将其合并到该修订版本中。如果您进行了很多更改,这可以节省您一些时间,但是如果Main中有很多更改,则在解决冲突方面也更具风险。

  2. 已选择变更集:您可以选择一个或一组变更集进行合并,然后重复此过程,直到合并回所需的内容为止。风险较小的选项,但更耗时。我个人更喜欢这种方法,这样我就可以看到更改返回到主干,并且知道更改将带来什么。

  1. All changes up to a specific versions: You choose based on a revision and merge it all up to that revision in one fell swoop. If you have a lot of changes, this can save you some time, but also is riskier in terms of resolving conflicts if there have been a lot of changes in Main.
  2. Selected changesets: You select single or groups of changesets to merge back and then repeat this process until you've merged back what you need. Less risky option, but much more time consuming. I personally prefer this approach so that I can see the changes going back into the trunk and know what to expect as changes.

TFS将指示您在合并时是否存在合并冲突。在分支到开发部门之后,如果您在中继中进行了某些更改,就会发生这种情况。如果您在开发中所做的更改之一与您在主干中所做的更改相冲突,则您将有机会在Visual Studio中解决此问题。

TFS will instruct you if there are merge conflicts while you are merging. This occurs when you change something in the trunk after you've branched to your development. If one of the changes you've made in development conflict with the changes you've made in the trunk, you will have the chance to resolve this in Visual Studio.

如果您没有任何冲突,则您的开发更改将移入Trunk,并简单地与您已有的更改合并。

If you do not have any conflicts, your development changes will move into the Trunk and simply merge with the changes you already have there.

这篇关于TFS反向集成回到主要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆