title: git submodule and fetch
body: <p>having trouble getting my head around submodules</p>
  
  <p>They appear to be unnecessarily complicated. Normally I totally avoid them but a project has forced me into this situation</p>
  
  <p>So...</p>
  
  <p>I have a git repo on our dev server with a submodule</p>
  
  <pre><code>/myproject
            /.git
            /files ...
            /other
                 /submodule
                           /.git
  </code></pre>
  
  <p>Now because we run a dev/prod environment we are very restricted in what we can do</p>
  
  <p>How do I </p>
  
  <ul>
  <li>Clone the repo to prod such that the prod server is fully populated with the parent git and all the submodules checked out?</li>
  <li>How do I then... 
  
  <ul>
  <li>update a file in other/submodule </li>
  <li>commit it</li>
  <li>fetch it to the cloned repo</li>
  <li>then merge it in the cloned repo</li>
  </ul></li>
  </ul>
  
  <p>We traditionally use a fetch then merge strategy rather than a single pull. Due to the very small size of the team we also do not use a bare repo.  </p>
  
  <p>I have tried multiple different methods of achieving the above and none of it seems right. there seems to be a very large number of steps involved so I must be doing something wrong.</p>
  
  <p>Also I do not want the fetch to the prod server to fetch from the submodules remote repo.</p>
  
  <p>Just so you know the project I am working on is a drupal 8 project and it is entirely inappropriate to do dev on production we do not even install composer or drush.</p>