title: How to manage puppet control repo branches?
body: <p>We have a control repo <code>platformX</code> which has 3 branches: <code>dev</code>, <code>test</code> and <code>model</code>.</p>
  
  <p>The control repo consists of the following files/dirs which get modified each time we introduce a new module:</p>
  
  <ol>
  <li>hieradata</li>
  <li>Puppetfile: points to the module directory</li>
  <li>site dir: contains the roles &amp; profiles modules invocations</li>
  </ol>
  
  <p><strong>A simple workflow</strong></p>
  
  <ol>
  <li>Work on module and test locally</li>
  <li>Push module to remote repo</li>
  <li>Branch out from <code>dev</code> to say <code>feature_1</code>  and update the files and directories above</li>
  <li>Test on a single host with the environment <code>feature_1</code></li>
  <li>Merge <code>feature_1</code> with <code>dev</code></li>
  </ol>
  
  <p><strong>Problems Faced</strong></p>
  
  <p>Now I have the <code>dev</code> branch with the new module. Whats the best way to update <code>test</code> and <code>model</code>? Keep in mind that I cannot merge <code>dev</code> with <code>test</code> and then <code>test</code> with <code>model</code> because: </p>
  
  <ol>
  <li>There maybe changes in <code>dev</code> that is not ready to be applied in <code>test</code> or <code>model</code>yet</li>
  <li>I could inadvertently introduce something I shouldn't because I initially branched from <code>dev</code>.</li>
  </ol>
  
  <p>I could branch from <code>test</code>, update heiradata, Puppetfile and roles &amp; profiles to introduce the changes to <code>test</code> but this seems cumbersome because I have to repeat this again for <code>model</code> which inevitably can lead to human errors.</p>
  
  <p>I'm sure others have faced this problem and have a sound solution - care to share your thoughts?</p>