Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitflow branching strategy - multiple releases

currently, we are using the GitHub flow (feature branching) strategy. However, with that, the problem is sometimes features are queues in for releases i.e.

  1. I have my featured merged in development (or master, we have only) branch and deployed to Test Environment for testing.
  2. Meanwhile, we want to develop or fix some high priority bugs/features. I can't do that without reverting earlier code from develop branch.

To solve this issue, I am trying to implement GitFlow Branching Strategy. However, I am thinking that very similar problem as above may arise as mentioned below.

  • I created a new feature branch, done my development and merged to develop
  • we merged few more feature to develop
  • Cut out a new release branch (let's called release-A) and then deploy it to Test Environment for testing.
  • meanwhile this feature is being tested, new feature request came which has a high priority
  • Now if I branch out of latest develop, it has other features (release-A) which I don' t want to deploy to prod. (or merge with the master)

Questions:

  • Rather, than branching of lastest, develop branch, should I branch from the commit has which is in PROD?
  • if so, should I create a release from the feature branch?
  • how to deploy this in Test so that testing or both (release-A and this new feature can happen in parallel). The latter point is no so important.

Note: I am using Microsoft Azure Data Factory, and so I need to merge some changes to develop branch ( related to Azure Data Factory) otherwise I won't be able to publish those changes (won't be able to create ARM template to deploy to other environments)

like image 443
Gaurang Shah Avatar asked Oct 28 '25 16:10

Gaurang Shah


1 Answers

Check https://nvie.com/posts/a-successful-git-branching-model where the branching model is nicely visualized.

If your new high priority feature should preempt the ReleaseA and should go straight to production, I would consider it a hotfix and therefore I would create a hotfix branch from the latest production version. Develop the feature there and test it and then merge straight into he master and into the development branch.

Feature branches are temporary branches that get branched off and into development only. So you would never create a release branch from a feature branch or merge feature branches straight into production/master.

like image 190
Andreas_75 Avatar answered Oct 31 '25 07:10

Andreas_75



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!