1

I have to upload a new project to TFS. This project is already finished but it is not under control version yet.

I have decided to work with two branches: main, dev. In my case release is not necessary, I can do all the stuff using feature isolation branching strategy.

Initially I create a team project. Using team explorer from Visual Studio I create two folders: Main and Dev under team project.

First I upload project to Main folder.

From now on each time a new feature must be implemented I create a dev branch from Main folder and put it under dev folder, let's say dev_branch_01. This dev branch will be short-lived.

The implementation of this feature is divided into parts. Each part is done by a developer so each developer creates a new short-lived branch from the dev_branch_01 just created in order to implement the assigned part. When all developers have completed their part, they merge their dev branch into dev_branch_01 and resolve conflicts.

Once all the parts have been merged into dev_branch_01, QA Team makes the necessary tests against this branch. When all tests are passed by QA Team, dev_branch_01 is merged into Main branch.

Here, I have a doubt: all the short-lived dev branches done from dev_branch_01 by each developer could be deleted? Also dev_branch_01 could be deleted as well?

Later in future, when a new feature must be implemented, we repeat the process again, I mean, we create a new short-lived dev branch from main branch, let's say dev_branch_02 and we repeat the entire process explained above.

We always have one main branch and many short-lived dev branches.

I would like to know if the way we work with main and dev branches is correct.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Willy
  • 9,848
  • 22
  • 141
  • 284
  • First question for you, why have you chosen tfvc over git on this new project? Git is going to be much more flexible when it comes to creating feature branches and stitching it all back together again. – ManxJason May 01 '19 at 10:21
  • @ManxJason well, basically because tfvc is used in my company with other projects. – Willy May 01 '19 at 15:12
  • VB.net is used in mine with other projects, doesn't mean I create a _new_ one with it. Your team should take a look at Git and see if it'll work better for you. – ManxJason May 02 '19 at 16:03

1 Answers1

1

Lest break this question:

Here, I have a doubt: all the short-lived dev branches done from dev_branch_01 by each developer could be deleted?

In TFS the branch are not physically deleted, when you first delete, TFS will just Hide from the main view, image bellow. because that you can't name a branch 2 times with the same name, to reuse a name you need to force delete which I don't recommend.

So, the answer for your first question the answer is yes, it can be delete without problem, just remember, you can't create a new branch with the same name in the future.

If you want to see deleted branches click in the button Xx in your Source Control Explorer. With this option, you'll see all the history of your old branches which is good because is the kind of think that you don't have with Git ease.

enter image description here

Also dev_branch_01 could be deleted as well?

I don't recommend that for 2 reasons

1 - I understand that you'll want to recreate this branch in the future and like i said, you can't create a branch 2 times with the same name.

2 - With this branch alive you will be able to restore a deleted branch for any reason that you'll find and keep the history consistence between branches.

Roberto Borges
  • 683
  • 1
  • 5
  • 14