title: GIT Nested repositories: Composer vs. SubModules vs. Subtree vs.?
body: <p>I've finally incorporated <strong>GitHub</strong> and <strong>Composer</strong> dependency management on my workflow. It's definitely a huge step forward, although I remain very confused about GIT managing the "nested" dependecies.</p>
  
  <p>As I'm using an awesome Wordpress Stack ROOTS/BEDROCK, my simplified directory structure looks like this:</p>
  
  <pre><code>|-- /project
  |   |-- /.git                    // git repository for the skeleton/stack of the project
  |   |-- composer.json            // list of dependencies, most of them are my own repositories on GitHub
  |   |-- /vendor
  |   |   |-- /php-dependency-1    // 3rd party dependencies not directly related to Wordpress
  |   |-- /web
  |   |   |-- /app                 // acts as "wp-admin" folder
  |   |   |   |-- /mu-plugins       
  |   |   |   |   |-- /SUBREPOSITORY-1    // my own framework feature, public, GitHub
  |   |   |   |   |-- /SUBREPOSITORY-2    // my own framework feature, public, GitHub
  |   |   |   |-- /plugins
  |   |   |   |   |-- /SUBREPOSITORY-3    // my own plugin, public, GitHub
  |   |   |   |-- /themes
  |   |   |   |   |-- /SUBREPOSITORY-5-PARENT-THEME    // parent theme used on my framework, public, GitHub
  |   |   |   |   |-- /SUBREPOSITORY-6-CHILD-THEME     // work for client, private, BitBucket
  |   |   |-- /wordpress           // Wordpress CMS
  |   |   |   |-- /wp-admin
  |   |   |   |-- /wp-includes
  </code></pre>
  
  <p>"Subrepositories" are defined in my <code>composer.json</code> on the root of the project and are downloaded from GitHub by <code>composer install</code>. So far so good.</p>
  
  <p>But! I expect to tweak my <code>parent-theme</code> and some <code>mu-plugins</code> a lot, I need to be able to push/commit from each of my projects they will be included. As you know, you can't really test wordpress theme without a wordpress installation ...</p>
  
  <p>So ... which way to go? <strong>There IS A LOT of posts about this topic and most of them mention SubModules</strong>, but if I get the idea of Composer correctly, they are kind of in conflict with each other. </p>
  
  <p>Just use nested .git repositories seem great for my case, altough it does not seem to work - if I try to push/commit nested repo, either "everything is up to date" or I get messages such as <code>Your branch is ahead by 1 commit.</code> <strong>So just "nesting it" is a no a go?</strong> </p>
  
  <p>Thanks in advance and sorry for a little confused tone of the question, I drowned a little in the topic. :) Any help would be much appreciated.</p>