title: How to handle shared code in git between different clients for same app
body: <p>We are developing a platform that has both a web client (in the browser) and a mobile client (using PhoneGap). They both utilize the same external API which is irrelevant to this question.</p>
  
  <p>The web client and the PhoneGap client share much of their code base, but there are differences. </p>
  
  <p>In the case of managing two completely separate Git repositories, every update (bug fix, layout change, new feature) has to be implemented in both repositories. In the future, we might have even more than two clients, increasing how cumbersome this approach is.</p>
  
  <blockquote>
    <p>What would be the best way to handle the shared code base? Can we have one "Core" repository containing the shared functionality, and two seperate repo's that are cloned from the core, with additional code / custom stuff, for instance? Any examples or resources on this topic?</p>
  </blockquote>
  
  <hr>
  
  <p><em>Note: Both clients are ReactJS SPA front ends built with Webpack and a selection of NPM packages.</em></p>