Skip to content

Branching models

A branching model is a set of conventions about how to use and name branches in a git repo.

Common branching models

Please read this article to understand the main branching models.

  • git-flow
  • trunk or github-flow
  • gitlab-flow
  • one-flow

For a given project, we adopt the branching model of our customer.

When we have the choice, we adopt our own branching model which works as follows:

Dzango branching model

  • Tags (x.y.z) are used to indicate production releases.
  • Branches are named after the major and minor versions, eg 0.7, 1.2. The latest version branch is the current development branch.
  • staging branch is used to deploy to the staging server; the staging branch is expected to be deployed daily.
  • Use feature branches, no direct commits to staging or development branches
  • Use PR to merge each feature branch into the relevant development branch.
  • Merge latest development branch into staging; staging branch is expected to be deployed to the staging server daily.
  • Merge staging intomain
  • Tag main branch and deploy tag to production