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: [email protected]:wuertele/drupal-deployer-test.git 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 [email protected]:wuertele/drupal-deployer-test.git cd drupal-deployer-test 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 drupal.org. I tried adding one of the changed files to the superproject, but it complained thusly: $ 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? Dave -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
