title: How to merge two code bases with Git
body: <p>I'm in a tracked situation. I've got a larger project (A) on Github. Then I took a copy of the complete code, created a Git repo (B) on Bitbucket (because it can be private).</p>
  
  <p>I made some changes on B which shouldn't be public and so stay on the Bitbucket repo. But the community pulled some new code on A. </p>
  
  <p>How to merge the new changes on A into B?</p>
  
  <pre><code>Repo A (Github):    R1a =&gt; R2a =&gt; R3a =&gt; R4a =&gt; R5a =&gt; R6a
                              ↓                           ↓?
  Repo B (Bitbucket):        R2a =&gt; R3b ===============&gt; R4b
  </code></pre>
  
  <p>So at version R2a I copied the code base to Bitbucket. Then I developed R3b on Bitbucket. During and after that on Github the version R3a, R4a, R5a and R6a were developed. How to merge those changes/versions two R3b to create the merged R4b?</p>
  
  <p>I know, that this won't be an automatic process because of conflicts. But how to merge from A to B exclusively?</p>