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

This widget could not be displayed.

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

244 views 14 2
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