在 TFS 中,如何对特定变更集进行无根据的合并? [英] In TFS, how do I do a baseless merge on specific changesets?

查看:29
本文介绍了在 TFS 中,如何对特定变更集进行无根据的合并?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

我有 2 个子分支,让我们兴奋起来,称它们为 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屋!

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