Reputation: 960
I have 2 project, and actually these 2 project is about 80% same each other, the mainly difference is just about language and business model, one is for larger audience using english language and have a 9$/month business model, another is using local language with freemium business model.
Sometime when I want to add new feature/functionality, I want to add it in both of the project, but also sometime I want to add feature especially just for the local project.
My question is, how do I maintain these 2 project with git ?
Upvotes: 5
Views: 542
Reputation: 50284
Is it possible for you to handle this via configuration and localisation? That is:
My personal view is that one project = one repository. If your websites are clearly very different then I still think your problem could be handled better by refactoring the common code into modules that can be configured and modified in a sane, controlled way. If you allow each project to have its own git repository then, without hard work, they could easily diverge and contain differences that cannot easily be tracked, introducing subtle bugs or untested functionality.
Upvotes: 2
Reputation: 265231
create three git projects:
one "core" project: it contains the code shared between the other two projects
your english project: it has a submodule for the core plus specific code
this way you can change your core project, update the submodule references and you'd be good
Upvotes: 8