Version Control
Introduction
We use Bitbucket for version control to track changes, collaborate with developers, and ensure codebase consistency. Bitbucket hosts our repositories and manages user access, enabling robust branching strategies and rigorous code reviews. This approach ensures every change is tracked, reviewed, and approved, enhancing the quality and reliability of our software.
Implementation of this control
For hosting repositories and managing users, we use Bitbucket.
Branching Strategies
Every service will follow one of the following branching strategies:
Feature Branch + Pull Request
Production Branches
These strategies are described below.
Feature Branch + Pull Request
This branching strategy uses a combination of feature branches with pull requests.
Main branch protection: The main branch is protected.
Pull request approvals: Pull requests must be approved before merging into the main branch.
Code review process: We use pull requests to enforce and document our code review process. You can read more about it here: Code Review Process.
Merge commits: Pull request merges should create merge or squash commits (no fast-forward). Merges to the main branch should either be merge commits or squash commits, ensuring we can back out merges if needed.
Production Deployment Branch
The production deployment branch is an alternative to the feature branch/pull-request strategy.
Trunk-based development model: This allows a model similar to trunk-based development, where code reviews are implemented in the merge to production.
Production branch protection: The production branch is protected.
Pull request approvals: Pull requests must be approved before merging into the production branch.
Code review process: We use pull requests to enforce and document our code review process. You can read more about it here: Code Review Process.
Fast-forward merges: Pull request merges will fast-forward, meaning the production branch will always point to a commit on the main branch.
Protected Deployment Branches
To ensure adherence to our code review process, we protect the branches we deploy from (main or production) with the following requirements:
Approval requirements: Merges require at least one approval (two if the strategy is Production Deployment Branch).
Successful builds and tests: Builds and tests must run successfully.
Resolved merge checks: No unresolved merge checks are allowed.
Last updated