Monday, October 3, 2011

Best Practices & Guidelines to use TFS

In our everyday development, TFS (Team Foundation Server 2008/2010) has become the important part of our project. We  being developers daily check-in, check out files and perform various operations. We hardly bother about folder structure, check-in with or without comments, etc. Do we really follow any practices ? Not even our TL or PM care about it but it matters when the project becomes huge, big team working on it. One team working on Development, other on Testing or even multiple teams are working on development to accomplish Parallel development (PD) for agile methodology. PD is not a simple task to do and many TL & PM don't prefer it because they don't follow any practices & guidelines to use TFS.

I am sharing few points that I learned and I think they are really helpful to accomplish all development needs for agile.

Basic Guidelines
  1. Do not add binary files to Source Control which can be easily created except static dlls.
  2. Always create 1 Main branch which shouldn't be used for development.
  3. Main should be always stable & clean.
  4. No direct check-ins in Main.
  5. Use branching & merging.
  6. Create branches and divide them as per various release or iterations
  7. Merge often, at least once in a day within release.
  8. All branches must be originated from Main.
  9. All active branches must be in sync.
  10. While branching source must be latest.
  11. While merging destination must be latest.
  12. Don't reuse or delete dead or unused branches

    To be continued.....Plz let me know if you have any question & comments. If required I will elaborate required points.
    Thanks.
CodeProject

3 comments:

  1. why no direct checkins on main? How is it going to help.

    How do we merge 2 diff branches (with new changes)into main branch at the same time.

    ReplyDelete
  2. @Anil: Good Questions.
    1) No direct checkins in Main b'cauz of point (3)- Mail should be always stable & clean.

    2) Check above point 8,9,10,11.
    If you have 2 branch from Main, you should merge it as:
    Merge Branch1 -> Main
    Merge Branch2 -> Main
    Merge Main -> Branch2
    Merge Main -> Branch 1

    So, for 2 branch, there would be 4 merge.

    ReplyDelete