11---
2- title : Git repository information
3- linkTitle : Git repos
2+ title : Git repo info and branch model
3+ linkTitle : Git repos and branches
44cSpell:ignore : hotfixes
55---
66
@@ -13,54 +13,91 @@ Docsy:
1313- ** Website** in the ` docsy.dev ` directory. The website uses the Docsy theme, of
1414 course, with extra styling.
1515
16+ These two projects are kept in sync at release points, but they may diverge
17+ between releases, usually to allow the website to ship doc content and UX
18+ improvements without forcing a theme release.
19+
1620The main Docsy example site is [ Goldydocs] , located in the [ Docsy example site
1721repository] [ ] .
1822
1923## Branch model
2024
21- Both the Docsy and Goldydocs repositories use the same branch model :
25+ This repository's branch model is as follows :
2226
23- - ` main ` : development branch
24- - All feature work and documentation updates land here first.
25- - Source of the _ leading-edge_ theme and website versions.
27+ - ` main ` : development branch for the next theme release and next site content.
28+ - ` release ` : release and maintenance branch for the current stable theme version
29+ - Publishing branches used by Netlify:
30+ - ` deploy/prod ` : production site for the current stable release docs.
31+ - ` doc-rooted ` : production branch for the doc-rooted site variant.
32+ - These branches determine what is published. They are not feature development
33+ branches.
2634
27- - ` deploy/* ` : publishing branches used by Netlify
28- - ` deploy/prod ` : production site
29- - ` deploy/docs-only ` : docs-only site variant
30- - These branches determine what is published. They are not development
31- branches. Changes must originate from ` main ` and are typically
32- fast-forwarded here.
35+ The Goldydocs repo has the same model, except for ` doc-rooted ` which is not
36+ used.
3337
3438### Tags
3539
36- - Tags are used for ** official theme releases**
37- - Tags are attached to ` main ` commits, which are shared by ` deploy/prod ` since
38- the two branches sync on releases.
40+ - Tags are used for ** official theme releases** .
41+ - Tags are created from ` release ` .
42+
43+ ### Workflow
44+
45+ #### General workflow
46+
47+ 1 . Theme and site work is done on ` main ` .
48+
49+ 2 . When ready to release:
50+ - Stable release: fast-forward merge from ` main ` to ` release ` .
51+ - Patch release: create and merge a release PR from ` main ` to ` release ` ,
52+ e.g., by cherry-picking relevant commits.
53+
54+ 3 . Publish site updates:
55+ - Fast-forward ` deploy/prod ` from ` main ` when possible.
56+ - Otherwise (usually because of ` release ` was patched),
57+
58+ - Bring release-facing site updates (for example changelog and release blog
59+ updates) onto ` main ` from ` release ` .
60+
61+ 4 . Netlify deploys from ` deploy/prod ` and ` doc-rooted ` .
62+
63+ This keeps theme releases and site deploys coordinated, but not tightly coupled.
64+
65+ #### Patch release workflow
66+
67+ For patches to the theme or website, generally prefer making the changes to
68+ ` main ` first, though you can apply them to ` release ` then merge back to ` main ` .
69+ Assuming the former, the patch-release workflow is as follows:
3970
40- ### Release flow
71+ 1 . Cherry-pick relevant commits from ` main ` to ` release ` .
72+ 2 . Create a and merge a release PR from ` main ` to ` release ` .
73+ 3 . Bring release-facing site updates (for example changelog and release blog
74+ updates) back onto ` main ` from ` release ` .
75+ 4 . Update ` deploy/prod ` from ` main ` by fast-forward merging if possible, if not
76+ then selectively bring in release relevant changes.
4177
42- 1 . Work merges into ` main ` .
43- 2 . At release:
44- - Tag the release commit on ` main ` .
45- - Fast-forward ` deploy/prod ` to that same commit.
46- 3 . Netlify deploys from ` deploy/prod ` .
78+ ### Branch sync and invariants
4779
48- This keeps history mostly linear.
80+ ` release ` :
4981
50- ### Hotfixes (rare)
82+ - The theme release and maintenance branch.
83+ - Theme tags come from this branch.
84+ - Flow is usually from ` main ` to ` release ` via fast-forward merge, when
85+ possible, cherry-picking otherwise (on patch releases)
86+ - Periodically, after a patch release, record branch ancestry without taking
87+ content by periodically running ` git merge -s ours release ` on ` main ` .
5188
52- - If a fix lands on ` deploy/prod ` , it must be forward-merged or cherry-picked to
53- ` main ` .
54- - Next promotion fast-forwards ` deploy/prod ` to ` main ` again.
89+ ` deploy/prod ` :
5590
56- Invariant: ` deploy/prod ` should converge back to ` main ` ASAP.
91+ - Reflects the current release docs baseline
92+ - Can include site-only improvements that are compatible with the current
93+ release
5794
5895## Why this model?
5996
60- - Preserves a clean, mostly linear history .
61- - Allows website production deploys on release commits (and a rare hotfix) .
62- - Keeps ` main ` free for ongoing theme + site development .
63- - Maintains clear, immutable release points for theme consumers via tags .
97+ - Keeps stable theme releases predictable while ` main ` moves quickly .
98+ - Lets the website ship docs UX improvements without forcing a theme release .
99+ - Preserves clear release tags for theme consumers .
100+ - Keeps branch responsibilities explicit for a small maintainer team .
64101
65102[ Goldydocs ] : < {{% param example_site_url %}} >
66103[ Docsy example site repository ] : < {{% param github_repo %}}-example >
0 commit comments