Cactus Model

In this workflow, all branches branch out from a wide trunk (master branch) and never get merged back. This model should reflect much better the way that comes up naturally when working with Git and making sure that continuous integration principles are used.

Main characteristics:

  • All development happens in Master
  • Developers should rebase their changes frequently to follow the latest origin/master
  • Short-lived local branches are ok but should be integrated with origin/master when need to share something
  • Shared remote branches should be avoided
  • Releases get their own tags
  • Hot fixes get added to the release branch and cherry-picked to master
  • No normal merges, only fast-forward merges so instead use either rebase or cherry-pick

Authors: – Jussi Judin, 2016.

Links to original descriptions of Cactus Model workflow:

Characterisation of Cactus Model workflow 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,
G. Release
ii. IntegrationA. Master,
B. Develop,
D. Feature,
E. Topic,
F. Production,
G. Release
iii. ChangeA. Master,
B. Develop,
D. Feature,
E. Topic,
F. Production,
G. Release,
R. Fix,
S. HotFix,
T. BugFix
iv. ReleaseG. Release,
R. Fix
2. File managementd. Tagsiv. ReleaseA. <Git command options>REC
3. Syncingd. Direction – I. Upstreamiii. Changei. Main R<rr>REQR<rr> = R0
iv. Releasei. Main R<rr>RECR<rr> = R0
d. Direction – II. Downstreami. Mainiii. Change R<rr>REQR<rr> = R3
4. Branching
strategy
a. Create wheniii. ChangeA. To work on
a new feature
REQ
iv. ReleaseC. To prepare
a release
REQ
b. Create fromiii. Changei. MainREQ
iv. Releasei. MainREQ
c. Remove when iii. Change A. Integration
completed
REQ
e. Branch lifetime – I. Short-livediii. ChangeA. <max. days for short-lived branch>REQmax-days = 7
e. Branch lifetime – II. Long-lived i. MainA. <min. days for long-lived branch> RECmin-days = 7
5. Code
integration
strategy
a. Integrate wheni. MainJ. As
frequently as
possible
REC
iii. ChangeE. After
code review
completed
REC
b. Integrate intoi. Mainiii. Change R<rr>REQR<rr> = R3
iii. Changei. Main R<rr> REQR<rr> = R0
iv. Releasei. Main R<rr> RECR<rr> = R0
c. Code review mechanismiii. ChangeA. StagedREC
d. Code
integration
mechanism
i. MainA. fast forward
merge <Git command options>,
B. non-fast
forward
merge <Git command options> ,
E. fetch with
rebase and
merge <Git command options>
F. through bot or webhook
PRO
C. rebase <Git command options> ,
D. cherry-pick <Git command options>
REQ
iii. ChangeA. fast forward
merge <Git command options>,
B. non-fast
forward
merge <Git command options> ,
E. fetch with
rebase and
merge <Git command options>
F. through bot or webhook
PRO
C. rebase <Git command options> ,
D. cherry-pick <Git command options>
REQ
iv. ReleaseA. fast forward
merge <Git command options>,
B. non-fast
forward
merge <Git command options> ,
E. fetch with
rebase and
merge <Git command options>
F. through bot or webhook
PRO
C. rebase <Git command options> ,
D. cherry-pick <Git command options>
REQ

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 and R3 is the working/contributor repository.

Comparison against other workflows: