how to structure a git repository for a product

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

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

161 views 6 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you