title: How do you combine two git repos?
body: <p>I have a main repo (repo 1) that I work with. I have another repo (repo 2) that needs to fit into the first one and I'm not sure how I could have them both in the same folder. The idea is that I have a standard codebase that I need in each project - yet each project is it's own git repo.</p>
  
  <pre><code>/project
      /.git(repo 2)
      /.git(repo 1)
      /repo_2_sub
          /repo_2_sub_sub
              /repo_1_sub_sub
      /repo_1_sub
          /repo_1_sub_sub
          /repo_2_sub_sub
  </code></pre>
  
  <p>None of the files overlap - but some of the folder structures do. So sometimes certain folders from one repo will be in the other repo.</p>
  
  <p>How can I work so these two repositories build the complete codebase?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Both git repos exist in the same root project folder level. They cannot be submodules since they cross back and forth through each other as shown above. They are not separate folders.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>Wait, maybe this is easier than I thought. Can you clone a standard codebase repo and then create a new branch that is your project and then just keep merging that branch with the codebase repo each time it changes?</p>