title: Which branches should be associated with deployment slots in Azure
body: <p>I'm launching an application on Microsoft Azure using deployment slots and source control. I'm in doubt which branch to associate with production deployment slot. If I setup a staging environment and connect that to master branch and then run a swap, it correctly switches to the master code base in production slot. If I swap back it swaps to staging, it shows old code in production. This tells me that production is currently not associated with a branch (which I also didn't set it up to be). </p>
  
  <p>My question is now, which branch do I associate with staging and which branch do I associate with production?
  When and how will the code in production be replaced so that I can put new code in staging (master branch)?</p>
  
  <p>My concerns are:<br>
  - If there is no branch associated with production, then how can I switch correctly between deployment slots and get value of the feature?
  - If I associate a branch with production slot, then that code won't go through staging environment when deployed.
  - I assume that I want to not switch source control repository branch on my online environment every time I want to deploy.
  - If I set it up like this then I would think that I have to deploy to staging environment and then swap to production. In order to have that codebase in production I would have to deploy that same code to production afterwards.
  - I thought I would always merge a branch into master and not into another branch first.</p>
  
  <p>I believe there is something I'm not getting right. What do I have to do?
  Please explain in relation to what code to have in master branch.</p>
  
  <p>Thank you.</p>