Source Control
This page describes how we collaborate on code using Git, pull requests, and a shared branching strategy.
It applies to all development work that results in code changes.
This is relevant for all developers contributing to the codebase.
Branching strategy
Section titled “Branching strategy”We use a lightweight branching strategy based on a shared main branch, short-lived feature branches, and a long-lived release branch for production releases.
This is a feature-branch workflow with a release branch.
The strategy focuses on frequent integration, keeping branches short-lived, and keeping the main branch stable.
The goal is to:
- keep the main branch stable and deployable
- enable parallel development
- support controlled and traceable releases
Main branch
Section titled “Main branch”The main branch represents the current, stable state of the codebase.
It should always be in a deployable state.
All changes are integrated into the main branch via pull requests.
Feature branches
Section titled “Feature branches”Feature branches are created from the main branch and are used to develop:
- new functionality
- bug fixes
- technical improvements
Feature branches should be:
- short-lived
- focused on a single change or task
Once work is complete, the branch is merged back into the main branch through a pull request.
Release branch
Section titled “Release branch”A release branch is used to prepare and publish production releases.
The release branch is long-lived and is updated by merging changes from the main branch.
When a release is ready:
- a pull request is created from main targeting the release branch
- version changes (if applicable) are applied
- the pull request is reviewed and approved
Once merged:
- automated build and publish pipelines are triggered in Azure DevOps
- the release is deployed according to the defined release process
Pull requests and code review
Section titled “Pull requests and code review”All changes to shared branches must go through a pull request.
Pull requests are used to:
- review code
- share knowledge
- ensure code quality
- reduce the risk of defects
At least one reviewer is required before merging.
Working agreements
Section titled “Working agreements”The following working agreements apply to all repositories:
- Keep branches short-lived (preferably days, not weeks).
- Rebase frequently to reduce merge conflicts, unless a merge commit is explicitly required.
- Avoid committing generated artifacts unless explicitly required by the repository.
- If a change affects behaviour, interfaces, or usage, update relevant documentation.
- Prefer small, focused pull requests over large, long-running ones.
Commit messages
Section titled “Commit messages”Commit messages should follow the Conventional Commits standard.
This helps to:
- create a readable and meaningful commit history
- support automated tooling
- improve traceability between changes and work items
See: https://www.conventionalcommits.org/
Visual overview
Section titled “Visual overview”The diagram below illustrates the high-level flow.
flowchart LR
A[Main] --> B[Feature branch]
B --> C[Pull request]
C --> A
A --> D[Release branch]
D --> E[Build & publish]
E --> F[Deployment]