I have a situation where which git strategy is suitable to use?
Situation :
We have one application which has a git repository. In which we follow the branching strategy,
Branch : develop : used by all developers to implement the features
Branch : testing : where the code developed till current gets deployed to test the application.
Branch : production : After approval from testing team we merge testing branch to production & deploy it to production environment.
Problem :
Now we have 3 different installations of the production (site1.mainDomain.com, site2.mainDomain.com,site3.mainDomain.com), these 3 installations has different headers (logo, header color) for now.
There can be possibility that site1.mainDomain.com has some set of features that can be developed in future & can be only used for site1.mainDomain.com.
Some future features can be common for site1.mainDomain.com, site2.mainDomain.com but not for site3.mainDomain.com.
Now if there is any issue on production of site1.mainDomain.com & which is the major issue from the base branch, how we are gonna manage this thing.
So for achieving this which git strategy is useful? I was reading about sub-modules, git sub-tree, git patches.. but little bit confused to make the decision. Please suggest the best possible solution and strategy to follow.
Thanks in advance. Vijay
I think you are looking at the wrong place (version control system) for solving this problem. In this kind of situation I would usually create different settings files for different contexts, keep all of those in the same git branch, and just have a small local configuration file for each deployment (mostly choosing the right context). Then your code can check, based on the context, what kind of content to show.
I would strongly recommend against making different feature branches for each site, because that will get you into an untidy mess and constant merge conflict resolving really fast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With