Friday, October 13, 2017

GitFlow

GitFlow is a branching strategy.  It advises when to branch, and which branch changes should be committed to depending on the nature of the change and the phase of the release cycle.

It can handle critical bug fixes (patch) and scheduled releases (new feature, bug fix, stabilization).

Here is the doc - Introducing GitFlow



Critical Bug Fix

  • Open a maintenance branch from master
  • Dev create specific branch from the maintenance branch for fixing bugs
  • Commit the changes and submit the merge request
  • Once the maintenance branch is ready, release the bug fix
  • Merge the maintenance release to master

Scheduled Release

Scheduled releases occur on a set frequency.

The release cycle for a scheduled release can be divided into two phases:
  • Development (develop branch)
  • Stabilization (release branch)
The releases can occur once every two weeks, and a stabilization phase of one week, the release cycle becomes three weeks long, with one week overlapping with the previous release.  During the overlap developers can work on changes targeting the next release or fix features scoped for the current release.

For changes made to the development branch, a developer creates a feature branch from the develop branch. They commit their work directly to the feature branch. Once the feature is completed the feature branch is merged to develop.  Feature branches are discarded after they are merged to develop.

The stabilization phase begins by creating a release branch from develop.  The new changes for new features will not be committed into this branch.  The bug fixes found by QA will be fixed into this release branch.   After the release branch is stable, the product is released from the release branch.

The release branch is merged to both develop and master. 


No comments: