在TFS中,如何对特定的更改集进行基本合并? [英] In TFS, how do I do a baseless merge on specific changesets?
问题描述
与 TFS 中的大多数内容一样,您获得的价值超过了您的讨价还价。在这种情况下,我在合并期间看到更多的文件更改比我预期的。
As with most things in TFS you get more than you bargained for. In this case I am seeing more file changes during the merge than I was expecting.
我有两个子分支,让我们很兴奋,称它们branch1和branch2。两者都创建后对它们进行了更改。我需要从branch2采取12特定的更改集,并将它们合并到branch1。来自branch2的更改不能返回到父分支。
I have 2 child branches, lets be exciting and call them branch1 and branch2. Both have changes made to them since they were created. I need to take 12 specific changesets from branch2 and merge them into branch1. The changes from branch2 can not go back to the parent branch. So it's a straightforward case for a baseless merge, but the results are not what I expected.
采用第一个变更集,我运行以下命令:
Taking the first changeset I ran the following command:
tf merge /baseless /recursive /version:C95654 branch2 branch1
更改集95654包含12个更改的文件,但在此命令后,我得到56个编辑文件冲突。我期望只将指定的更改集从一个分支合并到另一个分支,但它似乎已合并整个文件夹。
Changeset 95654 contains 12 changed files but after this command I get 56 edited files with conflicts. I was expecting to only merge the specified changeset from one branch to the other but it appears to have merged the entire folder.
那么为什么我得到56文件更改,而不是12当我指定的变更集?
So why do I get 56 files changed rather than 12 when I specified the changeset? Also what can I do to restrict what is merged to only the contents of that changeset?
推荐答案
如果你需要合并一个特定的变更集您需要使用以下语句:
If you need to merge a specific changeset you need to use the following statement:
tf merge /baseless /recursive /version:C95654~C95654 branch2 branch1
(这意味着只有C95654变更集)。
(It means ONLY changeset C95654).
命令行你使用的意思是C95654之前和之后的每个变更集。
The commandline you are using means every changeset before and with C95654.
这篇关于在TFS中,如何对特定的更改集进行基本合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!