title: Trunk-based development release & hotfix questions
body: <p>I'm having trouble to understand how to deal with the following scenario:</p>
  
  <ol>
  <li>Feature A is committed to <code>master</code> as commit <code>A</code>.</li>
  <li>We are ready for release <code>v1.0.0</code> so we tag commit <code>A</code> as <code>v1.0.0</code> and we create a release branch <code>rel-1.0.x</code> from it for QA.</li>
  <li>Feature B is committed to <code>master</code> as commit <code>B</code>.</li>
  <li>QA approves <code>v1.0.0</code>, we deploy and delete the <code>rel-1.0.x</code> branch.</li>
  <li>We are ready for release <code>v2.0.0</code> so we tag commit <code>B</code> as <code>v2.0.0</code> and create a <code>rel-2.0.x</code> branch from it for QA.</li>
  <li>A bug is found in production (<code>v1.0.0</code>) and must be fixed and deployed right away.</li>
  </ol>
  
  <p>At this point I'm not sure how we should handle that. If the bug is in the trunk we could create a hotfix branch from the trunk, fix the bug and merge into the trunk. Then, create a <code>rel-1.0.1</code> branch from <code>v1.0.0</code>, cherry-pick the fix from the trunk, tag it as <code>v1.0.1</code> and deploy.</p>
  
  <p>Now what I find odd is that the <code>v1.0.1</code> commit is not as-is in <code>master</code> given it's been cherry-picked from <code>master</code> and tagged in the <code>rel-1.0.1</code> branch. Furthermore, if the fix is also needed in <code>rel-2.0.x</code> then how should we handle this? Should we cherry-pick the bug-fix from the trunk again and tag it as a different version, such as <code>v2.0.1</code>?</p>
  
  <p>Here's the kind of graph I'd be getting doing the above (note that v1.1 represents version 2.0 of the text above and that it's the <code>Second feature A fix</code> that occurred while preparing the <code>v1.1</code> release.):</p>
  
  <p><a href="https://i.stack.imgur.com/nlHz8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nlHz8.png" alt="enter image description here"></a></p>