问题描述
几天来我一直在尝试所有我能想到的方法来让它发挥作用.Baseless 合并、重新父级、分支然后重新父级.
我想将一个分支重新设置为其中一个子节点的子节点,并打破该分支与其父节点之间的关系.
在下图中,我想将 Cassidy-Main 和 Bohem-Main 分别移动为 Cassidy-QA 和 Bohem-QA 的孩子.然后让 Cassidy-QA 和 Bohem-QA 成为 Acme-QA 的孩子.
预先感谢您提供任何帮助/建议/解决方案!
我已经创建了一个简单的示例供您参考:
原始分支层次结构
当您想将 Main-branch3.0-child2 重新父级为 Main-branch2.0 时,您将获得以下屏幕截图:
要指向另一个父级,您需要执行
更新
最后,我得到了你描述的内容:
更新 2
要执行 baseless 合并,首先您需要一个正确的工作区映射.并在本地工作区运行 tf 命令:
例如:
之后在待定更改页面中检查更改.
Been trying all I can think of for days to get this to work. Baseless merges, reparenting, branching and then reparenting.
I would like to reparent a branch to be the child of one of it's children and break the relationship between that branch and its parent.
In the image below, I would like to move Cassidy-Main and Bohem-Main to be a child of Cassidy-QA and Bohem-QA respectively. Then reparent Cassidy-QA and Bohem-QA to be children of Acme-QA.
Thanks in advance for any help/advice/solutions!
I have create a simple example for your reference:
The original branch hierarchy
When you want to reparent Main-branch3.0-child2 to Main-branch2.0, you will get below screenshoot:
To point to another parent, you need to perform a baseless merge. Do a baseless merge of the new parent to the target branch in cmd.
tf merge /recursive /baseless "$/MyFirstProject/Main-branch3.0-child2" "$/MyFirstProject/Main-branch2.0"
After this, it will shows the current parent and the new parent. Select the new parent and press "Reparent".
Update
Finally, I got what your described as below:
Update 2
To perform the baseless merge, first you need a right workspace mapping. And run the tf command in the local workspace:
For example:
After that check in the changes in pending change page.
这篇关于TFS重新父母成为孙子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!