Ralph Shillington
Ralph Shillington

Reputation: 21108

What to do with a branch after the merge with TFS

After merging a branch back to the "trunk" what do most people do with the branch. Just delete it? Move it to another area? Change it's permissions?

The concern we have is that developers who are away, and don't read their mail could come to work and continue working on the branch, after the merge has been done.

Upvotes: 38

Views: 9955

Answers (3)

stannius
stannius

Reputation: 1307

We move them to an Archive folder. We should probbaly change permissions as well.

Upvotes: 1

Martin Woodward
Martin Woodward

Reputation: 11770

Once the branch is definitely dead then I like to delete them. You can always undelete something in TFS if necessary (Options, Source Control, Show Deleted Items). Dev's working in that area without realizing it may get some strange behaviour (i.e. files dissapearing when they do a Get Latest) however it get's them to figure out something has happened pretty quickly.

That said, sometimes it can take a while to ensure that the branch is definitely deceased in which case changing the permissions on the branch so that only a limited number of people can edit the files on that branch is a handy technique. You can have one person lock all the files in the branch with a check-out lock but I've not found that to work too well when freezing a branch - permissions seems to work better so that you do not have to have a bunch of pending changes (the locks) to manage for all the files in the branch and also you can have more than one person working on it while it is being frozen.

Upvotes: 32

sgwill
sgwill

Reputation: 10554

We delete branches, once we're sure the merge was successful.

Upvotes: 5

Related Questions