I have an app (cms) which structure is like this:
BASE:
/application/
/public/
themes/
default/
mobile/
This is a base, central repository for all our projects. Then the projects get their own skin:
(which are based on /default/
theme)
CLONE1:
/application/
/public/
themes/
default/
mobile/
own/
...
own-theme-12/
(this app has 12 custom themes based on the default one).
The whole thing is about maintaining the applications and keeping all the CLONES up to date with the BASE.
Now, we add BASE as remote repo:
(/clone1/)$ git remote add base-repo /path/to/base.git
Then pull for updates when needed:
(/clone1/)$ git pull base-repo develop
When the .php
files in /application
are modified everything works great. The problem begins when we modify the files in default
theme in BASE repo (e.g. typo in reset.css
). We need those changes in CLONE1/default
theme and all of the CLONEx/own-x/
themes.
Of course some bash script will be needed to tell where to copy and commit the changes, but how to keep the whole thing in sync without merge conflicts?
We use git flow
. The default
and mobile
themes are not in the separate branches by now. Do we need them to be? We don't use submodules yet.
There are many ways to organize this workflow, but which would you choose as the optimal one?