I would like to use git to deploy Drupal to my web servers. My
servers use Drupal as a component, and Drupal is hosted via git from
drupal.org, so I figure that I can use git-submodule to do what I
need. But I don't know how to keep my changes private.
Before deploying Drupal to my servers, I apply some patches and add
some configuration info that I can not push back to the drupal.org
origin servers. But I would still like to develop these patches and
configurations in multiple locations shared by github. My problem is
how to distribute changes to the submodule without publishing them
back to drupal.org.
I created a test project I created on github to try to make this work:
I used git submodule to clone drupal from drupal.org (at a specific
tag, not at a branch head), then I created my own branch in the
submodule so that this tag would be the default commit checked out by
clones of drupal-deployer-test.git. I tested this and it worked as
hoped: I can do the following:
git clone g...@github.com:wuertele/drupal-deployer-test.git
git submodule init
git submodule update
And I am left with a subdirectory checked out to the tag where I
created the branch. This made me happy but it also surprised me
because the branch in the submodule no longer existed. How could the
superpackage have remembered what commit to check out if it didn't
remember the branch that I'd created?
Anyway, in my clone, I went into the submodule, created a branch,
edited a file, added it, and committed it. In theory, I could then
push this commit to the drupal.org server, but that would probably
make someone mad, and it would also reveal private configuration info
like database names. I want to push this change to github, not to
I tried adding one of the changed files to the superproject, but it
$ git branch drupal-core-patches
$ git checkout drupal-core-patches
Switched to branch 'drupal-core-patches'
$ git add drupal-7/includes/common.inc
fatal: Path 'drupal-7/includes/common.inc' is in submodule 'drupal-7'
Can anyone recommend a simple strategy for distributing my development
without publishing to drupal.org?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at