TFS reparent to be a grandchild

时间秒杀一切 提交于 2019-12-20 05:44:05

问题


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!


回答1:


Once you have completed a baseless merge between where it was and where you want tit to be you will be able to reparent.

There is however no way to remove the old relationship.




回答2:


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.



来源:https://stackoverflow.com/questions/42178330/tfs-reparent-to-be-a-grandchild

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!