12.4. Team Foundation Version Control Best Practices
Team Foundation Server and Team Foundation Version Control are brand new products, having just been released in the first quarter of 2006. As such, there is not a lot of best practice information built up around them. This section of the chapter attempts to outline what the authors believe to be some good ways to use Team Foundation Version Control. Some of the points presented here hold true regardless of the version control system you are using. You should take the following information and build off it to develop the best practices that work best for you and your organization.
12.4.1. The Trunk
Regardless of what you are developing, you want to have a copy of your code that will always compile, allowing you to create a product release of your code. This copy is referred to by Vincent Maraia in The Build Masters as the mainline, or trunk. The purpose of the trunk is to make it easy to create a release of your product. As such, no code is merged or added to the trunk until you are sure it compiles and passes any appropriate tests. This ensures the trunk is always in pristine condition.
Always start a top-level folder underneath a new team project to serve as a mainline or trunk. Create a folder called main, and put all the source code for the main branch in this folder. When a new branch needs to be created, you can branch from the main folder directly.
12.4.2. Check-In and Check-Out
Always use the shared check-out model. ...
Get Professional Team Foundation Server now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.