简体   繁体   English

TFS2013分公司合并

[英]TFS2013 Merging of branch

We have a simple branch process where we have a Main branch which is meant to be the source code used in production. 我们有一个简单的分支过程,其中有一个Main分支,它是生产中使用的源代码。 We also have one or more branches from Main which are development branches. 我们还有Main的一个或多个分支,即开发分支。 We have emergency fixes that go into Main but may not be in one or more of the development branches. 我们有一些紧急修补程序,这些修补程序已进入Main,但可能不在一个或多个开发分支中。 From time to time, and especially just before we promote a development branch to Main we merge from Main to the development branch to make sure everything from Main is in the branch. 有时,尤其是在将开发分支提升到Main之前,我们会从Main合并到开发分支,以确保Main中的所有内容都在分支中。 This time it was all there so no action was necessary. 这次一切都在这里,因此无需采取任何措施。 We then merged from the development branch to Main, naturally it identified all the files we had changed in the development branch, but it also came up with a small number of conflicts. 然后,我们从开发分支合并到Main,很自然地,它确定了我们在开发分支中更改的所有文件,但同时也出现了少量冲突。 Now as we had just successfully merged from Main to the branch I did not expect this. 现在,由于我们刚刚成功地从Main合并到分支,所以我没有想到这一点。 Investigation showed the following history for one of the files that had a conflict. 调查显示以下其中一个冲突文件的历史记录。

In Main 在主要

在此处输入图片说明

In development branch 在开发部门

在开发部门

It seemed a fix was made in the development branch (10917) and then merged to Main (11090). 似乎在开发分支(10917)中进行了修复,然后合并到Main(11090)。 For some reason when we merge down to the branch the previous merge up (11090) is not detected and so is shown as a conflict when we try and merge to Main. 由于某些原因,当我们向下合并到分支时,未检测到先前的合并(11090),因此当我们尝试合并到Main时显示为冲突。 In practice the code in both branches is the same but it causes extra work with us having to investigate changes that are not there. 实际上,两个分支中的代码都是相同的,但它使我们不得不研究不存在的更改,因此需要进行额外的工作。

Can not see why this did not merge down? 无法看到为什么这个没有合并下来? Is our process at fault? 我们的过程有问题吗?

I think this is caused by you didn't get latest of main branch before you try to merge to development branch. 我认为这是由于您在尝试合并到开发分支之前没有获得最新的main分支引起的。 Make sure you have get latest both of main and development branch before the merge. 合并之前,请确保已获取main和development分支的最新信息。

Next time, you can directly merge specific changest, you can select selected changesets then choose 11090. 下次,您可以直接合并特定的变更集 ,可以选择选定的变更集,然后选择11090。

在此处输入图片说明

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

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