TFS reparent branch - only the specified parameters are the current parent and "no parent"

I thought that the point of regeneration of a branch in TFS, I can set any parent branch that I wanted when I have every reason for this.

However, when I look at how regeneration of a function branch belongs to another release branch, the displayed dialog box contains only two elements:

  • current parent branch
  • "no parent"

This is not very helpful. Don't I understand this function or is there something I can do to relate to other branches?

+7
source share
2 answers

Yes, this is normal. Usually you will see only the parent branch, the "parent" and the child branch.

If you want to return to another branch, you must establish a connection between the two branches.

The solution is an unreasonable merge: tf merge /recursive /baseless new target branch child branch After that, in the dialog box you will see a new target branch. More information and steps can be found in this blog: Regeneration of a branch with a controlled version of TFS.

+8
source

As @StingyJack mentioned, I tried to redefine the branch, creating a link with unreasonable merge, but without actually updating any files in the child branch during the unreasonable merge .

Using the TF merge command with the /discard allows us to create relations between branches without changing the child branch and disconnecting relations without pending merges between them:

 tf merge $/Path/To/NewParent $/Path/To/Child /baseless /discard /recursive 

Then you can simply override the child branch for the new parent branch.

(At first I tried to merge the spaces or change the comments and ignore the rest of the unreasonable merge changes, but this did not create a relationship to enable the redefinition (and canceling 70,000 changes took 45 minutes + each time)).

0
source

Source: https://habr.com/ru/post/1247119/


All Articles