December 2006 - Posts

Making the Most of Team System Source Control

I often get asked if there's any particular "best practices" to take advantage of when using Team System source control for the first time. Particularly for developers who have only used SourceSafe.

There are a few key things you should know about TFS source control, and new capabilities of TFS that can improve your work. I'd start with Steven St. Jean's From VSS to TFS - An Introduction to Team Foundation Server Version Control from a Visual SourceSafe User's Perspective (PDF download), which is an excellent introduction to the essentials.

You shouldn't have to change your development habits, but you might consider tweaking them a little over time. Wez Furlong offers some tips in Coding for Source Control:

  • Embrace branches and tags
  • Think in terms of changesets
  • Code with merging in mind
  • Keep the diff readable

One key tip is to re-structure your source code for branching. Try to always start with a main folder off root of your project, eg:

$/WidgetFactory
    /Main
        /Reports
        /SharedLibraries
        /Web
        /GUI

Having a main folder means you can later create clean branches under your project without cluttering up the root of your Team Project, eg:

$/WidgetFactory
    /Main
    /v1
    /v2
    /ShowDemo

When you use Visual Studio's "Add to Source Control" option, you won't get this structure by default. Don't settle for the folder structure that VS 2005 arbitrarily chooses for you. It's your repository. Move folders around in source control to make the structure something that's easy for you, and your team, to understand!

posted by jatwood with 5 Comments