简体   繁体   中英

TFS reparent to be a grandchild

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!

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM