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 [[https://medium.com/@patrickporto/4-branching-workflows-for-git-30d0aaee7bf|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 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 currentdevelopment
branch. staging
branch is used to deploy to thestaging 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 thestaging
server daily. - Tag branch to deploy branch to producti