Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the consequences of renaming a branch in TFS 2012?

I've read in many places that renaming a branch is rather problematic in TFS 2010 : you may lose the history of the branch you just renamed ( as seen in this article or in this SO question )

I cannot find any mention of those problems in TFS 2012. Are there any consequences I should be aware of before renaming a branch in TFS 2012 ?

like image 400
tsimbalar Avatar asked Mar 20 '13 11:03

tsimbalar


People also ask

How do I rename a project in TFS?

Sign in to your organization. From the Projects page, choose actions for the project that you want to rename, and then choose Rename.

What is branching and merging in TFS?

Branching in TFVC uses path-based branches that create a folder structure. When you create a branch, you define a source, usually the main folder, and a target. Then files from the main folder are copied into your branch. As developers work, they are encouraged to forward integrate (FI).


2 Answers

The biggest problem with renaming a branch, is that you will effectively be performing a baseless merge next time you merge to or from the renamed branch. This can cause a lot of pain.

I'm currently trying to untangle such a mess at the moment and its not pleasant. (Branch was renamed 4 months ago. The first merge from the branch was partial) its a nightmare I wouldn't wish on my worst enemy (who coincidently are the devs who renamed the branch and did the partial merge)

See this answer for more info

like image 74
James Reed Avatar answered Oct 05 '22 11:10

James Reed


DON'T DO IT!!! You might be able to rename it on the server, but from my experience TFS wants to check every file out... basically treating it like a copy.

like image 45
RiddlerDev Avatar answered Oct 05 '22 11:10

RiddlerDev