Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to nest Git Submodules within Submodules?
    primarykey
    data
    text
    <p>I've done a fair bit of searching on this but none of the results quite hit the nail on the head.</p> <pre><code>$ mkdir blah $ git init $ git submodule add -b 7.x http://git.drupal.org/project/drupal.git drupal $ git submodule add -b 7.x-1.x http://git.drupal.org/project/devel.git drupal/sites/all/modules/contrib/devel </code></pre> <p>I then get the error:</p> <pre><code>The following path is ignored by one of your .gitignore files: drupal/sites/all/modules/contrib/devel Use -f if you really want to add it. </code></pre> <p>So I add the -f parameter...</p> <pre><code>$ git submodule add -f -b 7.x-1.x http://git.drupal.org/project/devel.git drupal/sites/all/modules/contrib/devel </code></pre> <p>... but, after cloning into the right place, I get this error:</p> <pre><code>fatal: Path 'drupal/sites/all/modules/contrib/devel' is in submodule 'drupal' Failed to add submodule 'drupal/sites/all/modules/contrib/devel' </code></pre> <p>I'm working on the principal that once I have all the submodules checked into place, I could just do a "<code>git clone --recursive</code>" on the 'container' repo, which would then grab Drupal, all my "contrib" modules (from the Drupal repository) + any custom modules I would add into <code>drupal/sites/all/modules/custom</code>. I still need to research if it's possible to automatically get the submodule to be an appropriate checked out tagged release...</p> <p>I've seen posts about git-slave (a 3rd party addon) and git-subtree (which looked like something to do with adding all your submodules into branches and merging them into place?!)...</p> <p>I just feel like I'm missing something as this is something SVN could do <em>REALLY</em> easily and yet everyoen seems to struggle with using Git...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload