I thought the point of branch reparenting in TFS was I could set any parent branch I wished when I have a good reason to do so.
However when I look at reparenting a feature-branch to belong to a different release branch, the dialog shown only contains two items:
This doesn't seem very useful. Am I misunderstanding the feature or is there something I can do to reparent to other branches?
Yes, it's the normal phenomenon. Usually, you will only see the parent branch," no parent" and child branch.
If you want to reparent to other branch, you must set a relation ship between the 2 branches first.
The solution is baseless merging: tf merge /recursive /baseless new target branch child branch
After that , you will see the new target branch in the dialog. More details info and steps please refer this blog: Reparent of a TFS Source Controlled Branch.
As mentioned by @StingyJack, I've been trying to re-parent a branch, by creating a relationship with a baseless merge, but without actually updating any of the files on the child branch during the baseless merge.
Using the TF merge command, with the /discard
switch set, has allowed us to create a relationship between the branches, without modifying the child branch and starting the relationship off with no pending merges between them:
tf merge $/Path/To/NewParent $/Path/To/Child /baseless /discard /recursive
You can then simply re-parent the child branch to the new parent branch.
(I had first tried merging whitespace or comment changes across, and ignoring the rest of the baseless merge changes, but this didn't create a relationship to enable the re-parenting (and undoing 70 000 changes took 45 minutes+ each time)).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With