Search code examples
visual-studioversion-controltfstfvc

Release from Main Branch or Release?


If I have three branches ("Dev", "Main", "Release") and Main branch is built, deployed to QA for testing, does it make more sense to deploy the same binary files from QA to Staging/Production, or merge to Release branch first, build and then deploy to Staging/Production?


Solution

  • You want to keep using the same binaries across all systems, that way you can setup a deployment pipeline, so build once, create a Label or a Branch in case you ever need to service this version, then build from Main and release that. It's enough to create a label (and the build server can do that for you automatically).

    That way, only in case you need to create an old service version, do you need to do extra work. Create the Branch from the label, fix the bug, clone the build definition from main, build, merge back to Main if needed, release.

    In most cases you should be trying to keep Main stable, so that when you need to release a hotfix you can simply release the latest version from Main.

    For extensive guidance check the ALM Rangers' Version Control Guidance.