Jerry Nixon @Work: Our Source Code Branching Strategy

Jerry Nixon on Windows

Thursday, November 4, 2010

Our Source Code Branching Strategy

You need one.

Source Control, like TFS 2010, provides many branching options. You need a branching strategy because once you are down a branching path, so to speak, it is difficult to turn back. A good strategy is simple to understand, easy to implement, and provides for the growth and needs of your development cycles.

You might ask, should we just use labels? And the answer is maybe. This might be enough for you, depending on your application. But a product with multiple in-production versions needs branching. We think we have come up with a strategy that meets the needs of 99% of our projects:

Click to see the full image.

This varies from many branching strategies in that our main trunk remains the primary focus of development. Each version is split off to a branch that will ultimately be abandoned. But we feel that merging from a smaller branch up to the trunk is easier than the opposite. There may be some caveats, but those are extreme edge cases in our experience.

I hope this helps you decide what strategy is best for your project(s).