如何在 TFS 中分支和合并 [英] How to branch and merge in TFS

查看:75
本文介绍了如何在 TFS 中分支和合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是上一个问题的衍生:如何对跨项目共享的资源进行版本控制

This question is a derivative of a previous question: How to version resources that are shared across projects

我有一个项目,其中包含许多其他项目使用的代码.具体来说,此父项目中的一个文件夹已分支到相关子项目.

I have a project that contains code that is consumed by many other projects. Specifically, one folder in this parent project has been branched to dependent child projects.

我们已经在父项目中进行了更改并签入.在源代码管理资源管理器中,我右键单击父项目中的分支文件夹并选择合并",打算将更改推送到依赖项目.我选择子项目作为目标,然后选择最新版本".向导通知我没有要合并的更改".

We have since made changes in the parent project and checked them in. In Source Control Explorer, I right click on the branched folder in the parent project and select "Merge", intending to push the changes to a dependent project. I select the child project as a destination and then select "Latest Version". The wizard informs me "There are no changes to merge."

在我看来,这不是真的,因为最近更新的文件明显不同.

From my perspective, this isn't true, since the recently updated files are clearly different.

这里是否对 TFS 中的合并过程存在根本性的误解?我需要做什么不同的事情?

Is there a fundamental misunderstanding of the merge process in TFS here? What do I need to do differently?

推荐答案

TFS 合并引擎几乎完全依赖于历史记录,而不是文件内容.这使得它对非常大的树非常有效,并且可以灵活地处理诸如安全挑选更改之类的任务——但它也使回答您的问题变得困难.

The TFS merge engine relies almost entirely on history, not file contents. This makes it efficient for very large trees, and flexible for tasks like safely cherry-picking changes -- but it also makes answering your question difficult.

第一步是了解诊断命令tf history、tf mergestf merge/candidate.这是一个很好的介绍:http://blogs.msdn.com/dstfs/archive/2009/04/15/a-note-on-merging-and-the-use-of-tf-merges-tf-merge.aspx

The first step is to understand the diagnostic commands tf history, tf merges, and tf merge /candidate. Here is a good introduction: http://blogs.msdn.com/dstfs/archive/2009/04/15/a-note-on-merging-and-the-use-of-tf-merges-tf-merge.aspx

如果您不熟悉分支&合并 TFS 那么你的历史可能不是很复杂.我认为您可能会通过快速调用 tf merges 找到答案.但是,在一般情况下,跟踪合并历史会变得非常复杂,因此如果您遇到问题,请随时回帖提供更多详细信息.

If you are new to branching & merging in TFS then your history is probably not very complex. I think it's likely you'll find your answer with one quick call to tf merges. However, tracing merge history can become extremely convoluted in the general case, so if you have trouble feel free to post back with more details.

这篇关于如何在 TFS 中分支和合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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