Amparo
Amparo

Reputation: 824

Several GIT projects with things in common and different things

I have an e-commerce developed from scratch. For each client I have to customize certain parts. What would be the best strategy to maintenance the code of all customers?

A) A single GIT project with one branch per client? In this way the incorporation of bug fixes is quite immediate. The problem is that each instantiation of each client I have on different servers. Several "remotes"? A little mess.

B) Several GIT projects, one for each client? Each project would be independent, I can have it each on your server and there would be no mess with the "remotes", each one of yours.

C) Subtrees of GIT (I have no idea how this is going)?

D) GIT modules (I have no idea how this is going)?

Upvotes: 1

Views: 30

Answers (1)

Justin.Cooke
Justin.Cooke

Reputation: 397

You'll probably want to commit some code to multiple clients such as bug fixes or sell additional features so I would go with option 1 to start with as its easier to rebase, cherry-pick etc.

You'll need to research a good branching strategy. Do some research online, there are lots of different opinions on this.

You can look into continuous integration and tools such as Jenkins and Ansible to automatically build, test & deploy off the different branches to the relevant clients. Continuous integration is used extensively across the industry now and makes a huge difference in terms of how maintainable and flexible your project / product is.

https://www.ansible.com/ https://jenkins.io/

Upvotes: 1

Related Questions