问题
I'm currently using the Development and Release Branch Isolation strategy with TFS 2015. I've been asked to rename the Main branch. As I've learned from this posting (Rename TFS 2013 Branch), rename is really branch and delete. Is there a risk of orphaning the Development and Release branches, along with their histories, if I do such a thing? Thanks in advance.
回答1:
It won’t. You can still view the hierarchy of your branch. The renamed branch will replace your previous branch in the hierarchy.You won't lose the history of the Development and Release branch.Howerver,the history of your previous main branch will be "lost". When you Rename a branch in Source Control, it will delete the previous one and create a new one , so that's why lost the history.But you can also view your previous main branch by making deleted items visible.
However, I strongly suggest you don’t do it, unless this is really necessary. For instance, once renamed, tracking a changeset is a real challenge in your Branching hierarchy view. When you tracking a changset in your child branch such as develop,it's in the hierarchy with the new renamed main branch. But it will also shows the associate with old main branch by dotted line .
来源:https://stackoverflow.com/questions/33653970/can-renaming-the-main-branch-in-tfvc-orphan-child-branches