38

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.

1

3 Answers 3

32

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.

2
  • 2
    I've used the permissions thing to lock down whole TFS Projects when we've moved on. It's extremely effective.
    – NotMe
    May 28, 2009 at 23:16
  • 4
    Does deleting the branch also delete the change history of the files? Jan 17, 2013 at 16:06
5

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

1

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

2
  • I found that doing it this way clutters the search results when doing a global search in Azure DevOps repos.
    – bkqc
    May 10, 2021 at 15:07
  • Thanks for the comment but Azure DevOps didn't exist in 2010. Branches in TFS were heavier weight than they are today, at least in git (which is the default source control for ADO).
    – stannius
    May 10, 2021 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.