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. stagingbranch is used to deploy to thestaging server; the staging branch is expected to be deployed daily.- Use feature branches, no direct commits to
stagingor development branches - Use PR to merge each feature branch into the relevant development branch.
- Merge latest development branch into
staging;stagingbranch is expected to be deployed to thestagingserver daily. - Merge
stagingintomain - Tag
mainbranch and deploy tag to production