App flow

This is my branching strategy for release-based projects. It is a modification of Gitflow, because apps don’t need a develop branch, and release and hotfix branches should be worked on by the whole team.

master

This is the canonical branch. Commits should never be made directly to master. Merging any code into master should require automated tests to pass as well as peer review.

feature-<name>

This is where the magic happens. When starting work on a feature, a corresponding branch is created from master, and all commits are made here. When a feature is complete, the branch is pushed to the server, a Pull Request is created, automated tests are run, the code is peer-reviewed, and then merged into master.

release-<version>

Once the app is feature-complete, a release branch is created from master, and test builds can be sent to users. Like master, no commits are applied directly to release. Private releases (for testing) should have their latest commit tagged with the version and build number (v1.0-b100). The final public release should have it’s latest commit tagged with the version number (v1.0). Once the release is published, a Pull Request should be created, automated tests are run, the code is peer-reviewed, and then merged into master.

bug-<name>

When bugs are found in a release branch, a new bug branch should be created from release, and all commits made here. When the bug is fixed, a Pull Request should be created, automated tests are run, the code is peer-reviewed, and then merged into master.

hotfix-<version>

When critical bugs are found in a public release, a hotfix branch should be created from the last public release. This branch should be treated the same as a release branch. Private releases (for testing) should have their latest commit tagged with the version and build number (v1.1-b100). The final public release should have it’s latest commit tagged with the version number (v1.1). Once the release is published, a Pull Request should be created, automated tests are run, the code is peer-reviewed, and then merged into master.

Appflow graph