Branching Guide
The branching strategy in D3b repositories is kept simple to reduce the amount of contextual awareness needed to keep branches in sync, understand the state of different branches, and reduce the number of often over-aged pull requests that need to be merged.
D3b uses GitHub flow
for its repositories which release tags being made directly on master.
Branches ready for merge in a Pull Request are required to rebase on the latest
master to ensure compatibility. Rebases are required over merges from
master into the feature branch (easily done through the GitHub interface) to
avoid commit histories full of updates from master.
Example

Development of a new feature on a feature branch
- A developer begins work on a new feature by making commits to a new
myfeaturebranch - Each commit pushed to GitHub will trigger status checks for the HEAD of the
branch as well as deploy into the
devenvironment - The developer creates a Pull Request (#1) to merge
myfeatureinto themasterbranch - Reviews are made and the developer continues modifying and adding commits to
the
myfeaturebranch - When reviewers and status checks are positive, the developer will
git rebaseon the latest master, then merge the pull request

Deployment of master to production through a release branch and tag
- The new
HEADofmasterwill trigger a new deployment to theQAenvironment - The new
HEADis to be deployed to theproductionenvironment, the Software Releases process of creating a version bump branch is followed - The version branch is merged back to
masterand theHEADtagged with a release version and triggers a deployment toproduction