I have a project of three sites with the same base.
The sites are builded in Zend Framework so the structure is as follow:
Only the /application/modules is used as base as the rest (might) contain site specific content.
I want to setup the Git/Sourcetree that i can maintain all the projects at once, my suggestion is to use Subtree but i don't know how to configure that right.
My site structure would be basic at this:
modules a Git submodule so it can be used in multiple projects.
Each company project would have it's own repository, but in each of those repositories, put a
.gitmodules file at the base that looks like this:
[submodule "application/modules"] path = application/modules url = //path/to/modules/repository
To initialize the
modules submodule in each repository run
git submodule update --init.
You can then work within the
modules repository in any project, commit, and push, then pull those changes into any of the other projects simply by going into that project's
modules submodule and running
git pull (or by using
git submodule foreach git pull from the project's base repository).