We have a project that is in TFS 2010 and was incorrectly branched. We want to fix it. This is the current structure we have:
- Development
- Integration
- Main
The problem is that Main is a branch of Integration, which in turn is branch of Development, when it should be the very opposite.
In other words, first it was created Development, then branched Integration and then Main.
Now all three branches have same code (were merged).
So, Is it possible to fix the TFS references to have the right flow: Main -> Integration -> Development?
As far as I know, there is no way to make this change behind the scenes. The problem you have in hand is that the Development and Main branches are out of place. Easiest thing to fix this would be to rename the "Development" branch as "Main" and vice-versa or Use the REPARENT option as shown at the end of the answer.
Am assuming that in your case since you have only one DEV branch (it wouldnt be possible to have more than 1 dev with the current branching structure), the development for the next release wont happen till the current release is out in production right? In that case, you can wait till the end of the current release and then rename the branches, so that all the 3 branches are in sync before the rename.
Another approach would be to use REPARENT. After a great discussion in the comments below, I tried the options myself and the best way to fix this would be to use the "Reparent" option. I tried this out myself by creating three different branches. You can do the following to fix it:
In Visual Studio, Click on the Main branch -> then File -> Source Control -> Branching and Merging -> Reparent. Select "No Parent" and then click "Reparent"
Click on the INT branch -> then File -> Source Control -> Branching and Merging -> Reparent. Select "Main" and then click "Reparent".
Click on the DEV branch -> then File -> Source Control -> Branching and Merging -> Reparent. Select "INT" and then click "Reparent".