创建与第二个分支具有相同初始代码库的 TFS 分支

发布于 2024-12-11 17:59:37 字数 239 浏览 0 评论 0原文

这是我当前的设置。 (TFS2008)

我有一个最新的主干。 我在 TRUNK 上有一个 BRANCH-A,只合并了生产就绪的代码。 我想在 TRUNK 之外创建一个新的 BRANCH-B,但我不需要所有最新代码,我只想要 BRANCH-A 中当前的代码。

完成此操作后,我将从 TRUNK 合并到 BRANCH-A 和 BRANCH-B(因此我不想将 BRANCH-B 从 BRANCH-A 中分支出来。)

谢谢。

Here is my current setup. (TFS2008)

I have a TRUNK with latest.
I have BRANCH-A off of TRUNK with only the production ready code merged in.
I would like to create a new BRANCH-B off of TRUNK but I don't want all the latest code, I only want what is currently in BRANCH-A.

After this is done I will be merging into both BRANCH-A and BRANCH-B from the TRUNK (so I don't want to branch BRANCH-B off of BRANCH-A.)

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

微凉 2024-12-18 17:59:38

您需要执行无基础合并。您想要实现的这种同级情况正是如何:执行Visual Studio Team Foundation Server 中的无基础合并

合并不直接从每个项目分支的项目的过程
另一种称为无基础合并。例如,您可能想要合并
两个发布分支之间的更改,它们是每个发布分支的兄弟

其他,不合并到父分支。您只能执行一个
使用 Tf merge 命令进行无基合并。您不能执行
从 Visual Studio IDE 内进行无基础合并。

当您执行无基础合并时,TFS 没有任何信息
关于分支中文件的关系。例如,如果
您已重命名文件,这将被视为已删除的文件和
新文件将添加到分支中
。为此,你必须
与执行冲突相比,执行更多的手动冲突解决
正常合并。然而,你只需要执行这个冲突
决议一次。执行无基础合并后,TFS
记录合并历史并建立之间的关系
文件夹和文件。

You need to perform a baseless merge. This sibling situation that you want to achieve is exactly what is described in How To: Perform a Baseless Merge in Visual Studio Team Foundation Server:

The process of merging items that are not directly branched from each
other is called a baseless merge. For example, you might want to merge
a change between two release branches, which are siblings
of each
other, without merging up to the parent branch. You can only perform a
baseless merge by using the Tf merge command. You cannot perform a
baseless merge from within the Visual Studio IDE.

When you perform a baseless merge, TFS does not have any information
about the relationship of the files in the branches. For example, if
you have renamed a file, this will be viewed as a deleted file and a
new file will be added in the branch
. For this reason you have to
perform more manual conflict resolutions than when you perform a
normal merge. However, you only have to perform this conflict
resolution once. After you have performed the baseless merge, TFS
records merge history and establishes a relationship between the
folders and files.

如若梦似彩虹 2024-12-18 17:59:38

创建 BRANCH-B 时,您可以选择最新或特定日期/变更集/标签。看一下您何时创建 BRANCH-A 并从相同的日期/变更集/标签创建 BRANCH-B。只要您没有对 BRANCH-A 进行任何更改,您就可以创建 B 来匹配。

另外,如果您还没有看过 TFS 2008 分支指南,请查看一下。有一些很棒的信息,并且采用了务实的方法。

When you create BRANCH-B, you can either choose latest or a specific date/changeset/label. Take a look when you created BRANCH-A and create the BRANCH-B from the same date/changeset/label. As long as you haven't made any changes to BRANCH-A, you can create B to match.

Also, if you haven't already, take a look at the TFS 2008 Branching guidance. There is some great information and uses a pragmatic approach.

撩发小公举 2024-12-18 17:59:38

对于后备箱
在创建分支时,您可以选择“从版本分支” - 默认情况下选择“按最新版本”。
选择按变更集或按日期

For TRUNK
On Create Branch you have option as a "Branch from Version" - by default By Latest Version is selected.
Select By changeSet or By Date

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文