[英]How to merge entire TFS branch
I have a Dev branch and a UA branch. 我有一个Dev分支和一个UA分支。 All I want to do is make UA identical to Dev, but after I merged I compared the two branches and there are a ton of differences between the two. 我想做的就是让UA与Dev相同,但在我合并后,我比较了两个分支,两者之间存在很多差异。 What do I have to do? 我需要做什么?
I tried tf merge /force /recursive c:\\branch\\Dev c:\\branch\\UA
but I get the error A version or version range must be specified when using the /force option. 我尝试了tf merge /force /recursive c:\\branch\\Dev c:\\branch\\UA
但我得到错误使用/ force选项时必须指定版本或版本范围。 I just want the latest version of Dev to be in UA. 我只想让Dev的最新版本在UA中。
I finally figured out that I needed to include /version:T
in the command. 我终于发现我需要在命令中包含/version:T
。 The T
tells it to use the latest version. T
告诉它使用最新版本。
Right-click -> merge : select target : ok 右键单击 - >合并:选择目标:确定
Note: if there is no direct parent-child relationship between the two you'll have to browse for the target branch and perform a baseless merge. 注意:如果两者之间没有直接的父子关系,则必须浏览目标分支并执行baseless合并。
Did you try it without the /force option? 没有/ force选项你试过吗? I don't think you need it to just do a basic merge. 我不认为你需要它只是做一个基本的合并。 This works for me: 这对我有用:
cd c:\path\to\team_project
tf merge /recursive dev\v1.0-prod dev\v1.0
My branch is inside a dev subfolder (C:\\path\\to\\team_project\\dev\\v1.0). 我的分支位于dev子文件夹(C:\\ path \\ to \\ team_project \\ dev \\ v1.0)中。 Here is the documentation on the merge command. 以下是merge命令的文档。
/force: Ignores the merge history and merges the specified changes from the source into the destination, even if some or all these changes have been merged before. / force:忽略合并历史记录并将指定的更改从源合并到目标,即使之前已合并了部分或全部这些更改。
So I'm not sure if you need to use the force flag just to merge from one branch to another. 所以我不确定你是否需要使用force标志来从一个分支合并到另一个分支。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.