Building Enterprise JavaScript Applications
上QQ阅读APP看书,第一时间看更新

The Driessen model

Driessen provided a detailed diagram of how his model works:

In Driessen's model, there are two permanent branches:

  • dev (or develop, or development): The main branch that developers work on.
  • master: Only production-ready code can be committed to this branch. Here, production-ready means the code has been tested and approved by the stakeholders.

There are also other non-permanent branches:

  • Feature branches: Branching from the dev branch, feature branches are used for developing new features, or fixing non-critical bugs. Feature branches will eventually be merged back into the dev branch.
  • Release branches: Once enough features or bug fixes havebeen implemented and merged into the dev branch, a release branch can be created from the dev branch to undergo more scrutiny before being released. For instance, the application can be deployed onto a staging server to be UI and manually tested. Any bugs uncovered during this process would then be fixed and committed directly to the release branch. Once the release branch is "free" of bugs, it can then be merged into the master branch and released into production. These fixes should also be merged back into the dev branch and any other release branches.
  • Hotfix (or patch) branches: Hotfixes are issues (not always bugs) that are in production which must be fixed as soon as possible, before the next planned release. In these cases, the developer would create a branch from master, make the required changes, and merge directly back into master. These hotfix branches should also be merged back into the dev branch and any other release branches.