What is the best branching strategy for webapp working both in beta and prod versions

Viewed 16

I can't imagine appropriate git branching strategy for a webapp, so I need your help. Below I wrote solution that came to me. You can comment it or suggest your own. The situation is that the webapp has two different versions - beta and prod. Both of them are visible to users and they use the same production data and api methods. The difference is that beta is for testing new features by users who want to try them first and for taking the feedback for brand-new design updates of already existed features (we had situations when we released at prod too unfamiliar design and users suffer from it. That's the reason why we started to use beta). And prod is the prod) After some time at beta features are going to prod. Or they are going to prod after taking feedback and making some fixes on the basis of feedback. But not every feature goes through beta, in some of them we are confident that they don't need to wait in beta and they go straightforward to prod (but at beta too).

So I want to find strategy in which 1) we are confident that feature that must be only in beta will not appear at prod, 2) we can work and release multiple features in parallel, 3) preferably minimum conflict-resolving, peer-reviews and testing.

I tried to come up with solution but it seems complicated and demands many stages of peer-reviews and testing.

My solution

Branches

  • all - both beta and beta+prod features are here
  • beta-test - testing environment for beta and beta+prod
  • beta - actual beta code
  • prod-test - testing environment for verified beta and beta+prod features
  • prod - actual prod code

The process

  1. Create feature-branch from all. Code in it. Create pull-request to all. Make fixes from peer-reviews. Merge feature-branch to all.

  2. Create feature-branch from beta-test. Merge feature-branch from all to feature-branch from beta-test. Resolve conflicts. Create pull-request to beta-test. Make fixes from peer-reviews (is it needed?). Merge feature-branch to beta-test.

  3. Test beta-test manually.

  4. Repeat step 2 but for beta instead of beta-test.

And the same steps for prod simultaneously or after trial period at beta.

0 Answers
Related