Updating Multiple Similar Projects

I’m looking for a piece of advice on how to deal with projects that share one base, but are different in some ways.

Basically, I’ve developed a CMS in PHP that is now being used in 3+ projects.

The projects share like 98% of all the features, what’s different is a few things in styles and images (logos).

I was thinking of creating a git repo “core/base” where would be all the “shared components” and every project would have a devoted branch where I would only put the “special files/features” :thinking:.
The problem is that if I were to push new changes to the “core/base”, I would have to merge them with the separate branches, which is not something I would want to do.

What I do now is that every time I make a change, I need to apply them to all the projects, which is not convenient at all.

PS: The projects are not located on one server.

Hello there,

It sounds like you want a package you can update, and then install in the respective projects (repos). Take some time to figure out what the “core” pieces are, and create a package from that. That way, updating the consumers should be easy (typical).

I am not sure how your CMS works, but it should be possible to make it configurable in many ways.

If you have something more specific to share, then others might be able to give more specific answers.

Hope this helps

Thanks for the reply!

I’ll probably try creating a bash script that will pull the data from the “core” repo into a tmp dir, then it will pull the data from the “project-specific” repo also into the tmp dir, and once it’s done, the script will copy the files from tmp dir into the project dir.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.