Archive for the ‘TFS’ Category

The TFS Merge Dance

Wednesday, November 11th, 2009

We do a lot of branching and merging at work using TFS. Merging can be difficult at times but here is a simple check list that we have come up with over time that we follow to reduce the headache a little – I still hate merging though!

Verify The Trunk Is Good

  1. Get latest on the trunk.
  2. Open up the trunk solution.
  3. Build the trunk solution.
  4. Run all the tests on the trunk. If you get any failed tests find out who to hit.
  5. Verify The Branch Is Good

  6. Get Latest on your branch.
  7. Open up solution.
  8. Build solution.
  9. Run all the tests and make sure everything is green.
  10. Forward Integrate

  11. Merge from trunk -> branch.
  12. Resolve issues in your branch – Build solution.
  13. Run tests again – repeat items 6 & 7 till you get green lights.
  14. Check in your merged changes.
  15. Check the Pending Changes window at this point to make sure that TFS has actually checked in everything ok.
  16. Merge Back To Trunk

  17. Merge from branch -> trunk.  If you get any merge conflicts at this stage you can safely copy from source to target for *.cs files. Project and configuration files should be merged manually.
  18. Get latest on trunk.
  19. Build the trunk solution.
  20. Run tests on trunk. Fix up any problems and repeat step 18 till you get green lights.
  21. Check in the merged changes.
  22. Check the Pending Changes window at this point to make sure everything is checked in ok.

Everything should all be good now