Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to branch a TFS Team project that has no branch folder

i have a Team project like this:

DefaultCollection
    -Project 1      
    -Project 2    
    -Project 3
    -Somefile.txt 
    -Somefile2.doc

All files and projects are in the root of the Team Project. I don't have "trunk" and "branches" folder. How can i create a new branch for the entire project?

like image 531
Herno Avatar asked May 22 '13 16:05

Herno


People also ask

How do I add a branch to TFS?

Right-click on the FAST Search folder and select Branching and Merging -> Branch from the context menu. Once you clicked on Branch it will open a prompt window and set the Target location and leave the defaults.

Can we create branch in TFS?

The development isolation TFS branching strategy involves one or more development branches. These are kept separate from the main. Each development branch is a complete copy of the main branch. Development branches are built and tested, then code is promoted to the main branch.

How do I create a branch in TFVC?

Create a folder for the branch in the Source Control Explorer. Check in the pending change. This is important as you can't convert the folder to a branch until the folder has been checked in. Right click on the folder in the Source Control Explorer and select Branching and Merging > Convert to Branch....

What is TFS Branching and Merging?

Merging allows you to copy code from one branch to another, or to synchronize changes between two branches. You can only merge branches if you use TFS as your version control system.


1 Answers

I find that creating a new folder inside the team project and moving everything inside is an easier solution, you can then convert that new folder into a branch (which will be your main branch) and create new branches as required.

Steps are:

  1. Open your solution explorer
  2. In your team project create a new folder (i.e. Main)

enter image description here

  1. Right-click on all other folders (and files in the root) and select 'Move', select your 'Main' folder

enter image description here enter image description here

  1. Check-in your changes
  2. Convert your new folder into a branch

enter image description here

like image 166
HaRoLD Avatar answered Oct 29 '22 16:10

HaRoLD