Alex Rivera | Logout

Branching vs. Shelves in TFS

Asked 2010-01-13T21:10:56.857
23

I've always used SVN in my past, and now that we have moved past the initial phase of a project we need to figure out our branching process for future enhancements.

In reading up on this, we see that TFS has Shelving.

How do they compare? What are the big gotcha's on each?

In general, which is preferred and why?

Edit
Report

1 Answer

12

Shelving and branching are not the same concept.

Branching is taking a code base and "splitting" it off, basically making a copy of it. Development teams can all work on their own branches (for example) and then all changes can then be merged back into an originating branch. Branches can only be merged into a parent branch in TFS.

Shelving allows developers to check code into the source control system into a "shelve". The code is not checked into the main branch. If a build manager or another developer "gets latest", he will not get shelved code by default. The shelve is safely stored in source control like all other code, it is just not in the branch. Other developers can pull shelves down to see the effects. At some point, the changes will be checked into the main branch and will be part of a changeset.

I suggest this book: http://www.amazon.com/Team-Foundation-Server-2008-Action/dp/1933988592/ref=sr_1_1?ie=UTF8&s=books&qid=1263417920&sr=8-1

It has a very simple, yet effective explanation of shelving, merging and various branching models.

answered 2010-01-13T21:25:57.360

Your Answer