GIT: project with 2 versions in different clients and main branch

5

I have a question about the GIT organization.

I have 1 project that will divide into 2 versions for different clients, I would like to maintain a main branch and that the generic changes would be made in this branch and replicated for the 2 versions, however each version will have its unique changes tb. p>

Is it ideal to do fork or with branches?

    
asked by anonymous 27.11.2017 / 14:16

2 answers

1

This is the kind of problem that a code versioner will not help you solve, what it helps is in the parallelization of a software development job, but the goal will always be for the branches to go back to the main.

I would recommend you to get a solution in the architecture, such as extensions or plug-ins, there are frameworks for this, in .Net there is the MEF, and in this link you may know how it works and look for something similar to the platform you use.

    
28.11.2017 / 05:13
1

You can use two distinct branches in the same repository. So it will be more practical to keep the two versions distinct when you need to make some changes that you want to apply to both branches by means of another branch, cherry-pick , etc.

However, I do not recommend to do this with your project. Try to keep only one single version of your application . If customers have different needs, control this with different screens or permissions. If you continue with this idea, you will end up with two different applications and the code you want to apply in both will not work out so differently that the two applications got one from the other. This will become a nightmare to keep.

    
25.07.2018 / 17:14