GitFlow

This workflow includes a branching model well suited for collaboration and scaling in the development team, by allowing parallel development, and offering a release staging area and support for emergency fixes

Main characteristics:

  • Master branch ready to be released
  • Versions tags off of master
  • Main development branch: develop
  • Features and Releases branches
  • Feature branches merge back into develop after approval
  • All work is done in a feature branch
  • Develop merged into a release branch
  • Hot fixes merged back into Master, Develop and Release branches
  • Release merged into Master
  • Master deployed to production (tag master with version number)

Authors: Vincent Driessen, 2010.

Links to original descriptions of GitFlow workflow:

Characterisation of GitFlow in our framework ( ✓ – Relation Role-Branch, REQ – Requirement, REC – Recommendation, PRO – Prohibition, ALL – Allowed):

CategoryFeature – Sub-featurePrimary roleValues / Options / 2ry roleEnforcement / SelectionAttributes
0. Framework setupb. Assign rolei. MainA. Master,
B. Develop
ii. IntegrationA. Master,
B. Develop
iii. ChangeD. Feature,
E. Topic
iv. ReleaseA. Master,
G. Release
vi. FixR. Fix,
S. HotFix,
T. BugFix
2. File managementd. Tagsi. MainA. <Git command options>REQ
3. Syncingd. Direction – I. Upstreamiii. Changeii. Integration R<rr>REQR<rr> = R0
iv. Releasei. Main R<rr>REQR<rr> = R0
ii. Integration R<rr>REQR<rr> = R0
vi. Fixi. Main R<rr>REQR<rr> = R0
ii. Integration R<rr>REQR<rr> = R0
iv. Release R<rr>RECR<rr> = R0
4. Branching
strategy
a. Create whenii. IntegrationD. To integrate workREQ
iii. ChangeA. To work on a new featureREQ
iv. ReleaseC. To prepare
a release
REQ
vi. FixB. To generate a fixREQ
b. Create fromii. Integrationi. MainREQ
iii. Changei. MainREQ
ii. IntegrationREC
iv. ReleasePRO
iv. Releaseii. IntegrationREC
vi. Fixi. MainREC
c. Remove wheniii. ChangeF. After integration was completedREC
iv. ReleaseF. After integration was completed, G. After additional tests were completed, H. After code review/validation was completedREC
vi. FixF. After integration was completedREC
e. Branch lifetime – I. Short-livediii. ChangeA. <max. days for short-lived branch>RECmax-days <= 1
iv. ReleaseA. <max. days for short-lived branch>RECmax-days <= 1
vi. FixA. <max. days for short-lived branch>REC max-days <= 1
e. Branch lifetime – II. Long-livedi. MainA. <min. days for long-lived branch>RECmin-days > 1
ii. IntegrationA. <min. days for long-lived branch>RECmin-days > 1
5. Code
integration
strategy
a. Integrate wheniii. ChangeC. When work
completed
REQ
iv. ReleaseE. After
code review
completed
REQ
vi. FixC. When work
completed
REQ
b. Integrate intoiii. Changeii. Integration R<rr>REQR<rr> = R0
iv. Releasei. Main R<rr>REQR<rr> = R0
ii. Integration R<rr>REQR<rr> = R0
vi. Fixi. Main R<rr>REQR<rr> = R0
ii. Integration R<rr>REQR<rr> = R0
iv. Release R<rr>RECR<rr> = R0
d. Code
integration
mechanism
iii. ChangeB. non fast-forward merge <Git command options>REQ
iv. ReleaseB. non fast-forward merge <Git command options>REQ
vi. FixB. non fast-forward merge <Git command options>REQ
6. Additional featurea. Development conventions – II. State of the development linei. MainA. Production-ready and broken code not allowedREQ
a. Development convention – III. Release mechanismA. New release based on previousREQ
b. Branch naming conventionsii. IntegrationB. <development line>REQdevline = develop
iv. ReleaseA. Semantic
versioning (semver)
REC
D. <development line>-*REQdevline = release
vi. FixA. Semantic
versioning (semver)
REC
D. <development line>-*REQdevline = hotfix, bugfix, fix
c. Supporting tools/mechanismsA. Version bumpREQ

Notes. All the features that are not included in this characterisation, whilst they are not in conflict with any of the features stated here, are assumed to be allowed (ALL). R0 is the source/reference repository.

Comparison against other workflows: