How can I create a branch from a TFS project based on a specific label?
I need to create branch from a TFS project that too only from a labelled version. I could see in the new project creation wizard that I can choose the project as a branch to an existing one. However I could only do that for the latest version of main branch.
There is no option provided to branch from a label.
Then start 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.
Although this can lower your total number of branches, it also complicates your build pipeline. The release isolation TFS branching strategy introduces releases branches from the main. This strategy helps teams manage concurrent releases. Instead of releases just being a copy of the main branch, teams create a new branch to support each release.
Creating branches for your Team Foundation Version Control (TFVC) repositories are useful to isolate risk. Consider some challenges team members typically face when they work on a software project that is staffed by more than five or ten people:
This conflict occurs because TFS does not always select the right version. Instead it looks for the closest common ancestor (base version), ignoring the merge history. You can see in the example that the main branch does not recognize the initial push from the development branch. It then creates an issue with future merges.
Just create an empty new team project in the same Project Collection. Then you can use the standard Branch feature in Visual Studio to branch over the exact labeled version you want.
The Create Project wizard doesn't have this feature, but the end result is exactly what you want. You can enter the target branch name as $/Other-Project/TargetFolder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With