Question

I currently have two branches setup

Main -> Dev

I want to inject a Test branch in-between those two branches.

I was originally going to branch from Main to Test then perform a baseless merge between Dev and Test then reparent Dev to Test until I read this:

Remove a Branching Relationship in TFS 2010

Since there is no way to remove the relationship between dev and main I could see this being a problem in the future.

My next thought is to branch from Main to Trunk.
Then reparent main to trunk.

So now I will have

Dev -> Main -> Trunk

Then rename Main to Test

So I will end up with

Dev -> Test -> Trunk

I am concerned about renaming Main and messing up the history. Also, if as a final step I renamed Trunk to Main, would that cause problems since I am renaming it to a branch that previously existed?

If anyone has thoughts on how to accomplish what I am looking for I would be much obliged.

Was it helpful?

Solution

A few options, each with their own issues:

  1. Rename $/Project/dev to $/project/test, branch $/project/test to $/Project/Develop (needs to get a new name, otherwise the old branch relation will be revived)
  2. Create a new branch for $/project/test from $/project/main. destroy $/project/dev. create a branch from $/project/test to $/project/dev. (history on dev is lost)
  3. Branch $/project/main to $/project/test, reparent $/project/dev, merge test -> dev. (the branch relation is succesfully created, but the relation persists between dev and main).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top