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 strongly recommend to NOT use git to solve the problem. I can tell it from experience, as the project I am working on fell into the trap of needing to maintain two git branches for no good reason. Github Firewall Install (Github:FI, predecesor to Github Enterprise) also had the same problem.
I suggest to take a look at Feature Flag (Feature Toggle) pattern to solve your issue – http://martinfowler.com/bliki/FeatureToggle.html