Documentation Branching Model¶
Purpose¶
Define the branching model for documentation repositories that supports a
staging preview on develop and a live published site on main.
For the day-to-day git workflow, see Git Workflow. This document defines the structural rules specific to documentation repositories.
Core invariants¶
developandmainare the two eternal branches.developis the default branch and staging target.mainis the promotion target for live/published documentation.- All changes arrive via short-lived branches merged to
develop. - Changes reach
mainonly via promotion PR fromdevelop. - Versioning is optional and not required for publication.
Branch roles¶
develop¶
- default branch for documentation
- integration branch for all changes
- source of the staging/preview documentation site (
devversion)
main¶
- promotion target for reviewed, publish-ready content
- source of the live documentation site (
latestversion) - receives changes only from
developvia PR
Promotion flow¶
To publish documentation changes to the live site:
- Merge feature/bugfix branches to
developvia PR. - Verify the staging site (
devversion) renders correctly. - Open a PR from
developtomain. - Merge the promotion PR to update the live site.
Short-lived branches¶
Use short-lived branches for all changes. Only feature/*, bugfix/*, and
chore/* prefixes are allowed. All branches must include the repository issue
number in the branch name.
Validation expectations¶
Documentation repositories must run markdownlint for documentation validation. Automated test or release validation is not required. Additional validation is optional unless a specific repository documents a requirement.
Forbidden operations¶
- direct commits to
developormain - long-lived branches other than
developandmain - merging to
mainfrom any branch other thandevelop - force-pushing to
developormain