Reputation: 739
I have a Rails website that is about to be sold to different clients with small variations for each client. In the meanwhile, I'll definitely be developing fixes and/or modifying the "common" parts of the project. So how would be the preferred way to manage this developing process with Git? Initially, I thought that "Branching" would be the way to go... but 1 min later I realized that anything committed on a single branch wouldn't available on other branches and this way to fix something in the "common code" would result in multiple commit to each branch. In the end I though that "Tags" might solve the problem since it's a way to track variations on a single branch. I couldn't think of any other options. Maybe someone can help.
Upvotes: 1
Views: 219
Reputation: 1243
You should aim to modularise your code so you end up with a common core and a collection of specialisations. Ideally the core will contain the majority of the code and the specialisations will be minimal.
I would suggest you have either:
Or:
Your deployment would then need to contain your common code (perhaps these are your binaries) and the specialisations (perhaps your configuration) specific to the customer.
Upvotes: 1