how to structure a git repository for a product

Romel Tejeira December 29, 2013
Good afternoon!
I could give a suggestion for how to structure a git repository for a product that the company has sold to several customers?
It is a single product, but customers will have different requirements and codes change sources. Currently there are several repository, one for each client, but is the same product. So the idea is to create a master repository of the product and when each client versions are released, the bugs fixed in a client, and others have corrected.
Thanks in advance for your attention.

2 answers

1 accepted

0 votes
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 29, 2013

Good morning Romel,

This is one of those questions that doesn't have one right answer, but I can give you my thoughts.

Depending on how you are customising the product for each customer you could extract out the common/core parts into a library, which is kept in one repository, and then depend on that library from each customer repository through some form of dependency management (ie Ruby Gems, Maven, Python Eggs, etc).

Otherwise you could just keep all the source in a single repository, and have "overrides" in customer specific folders. Because the files are in a single repository it will be tricky to make a change to the core product for one customer that doesn't affect another. The advantage of having a core library, mentioned above, is that you can "upgrade" a customer to a specific version of the product, whereas with a single repository there is only really one version/branch of everything. This may be what you want, I couldn't say.

Worst case scenario is to have a single repository with one branch for each customer. The problem here is that you constantly have to keep merging between branches and conflicts may arise. The advantage over your current approach is that you at least get conflicts if you change the same thing; I imagine at the moment you're having to manually copy files between each customer and it's hard to keep track of everything?

I hope that helps?

Charles

0 votes
Romel Tejeira January 4, 2014

Right. I will study further to find a more optimal solution.

Thanks for the suggestions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events