Git Workflow
CDT uses a feature-branch workflow on top of two long-lived branches: dev (integration) and main (production).
Branch strategy
| Branch | Purpose |
|---|---|
main | Production. Protected — only maintainers merge here, which triggers a CI release (semantic-release) and deploy. |
dev | Development integration. Feature branches merge here first via reviewed PRs. |
feature/* | Your work. Branch off dev, then open a PR back into dev. |
Branch protection.
mainanddevare protected. Contributions go through pull requests — direct pushes tomainanddevare restricted to maintainers. PRs intodevrequire maintainer review and approval, and only maintainers promotedevtomain.
Creating a feature branch from a GitHub issue
GitHub lets you create a branch directly from an issue. Once the branch exists, check it out locally:
git fetch origin
git checkout 718-creating-new-api-endpoint
Keeping your feature branch up to date
Before opening a PR, pull the latest dev into your branch to reduce merge conflicts:
git fetch origin
git merge origin/dev
Commit message convention
CDT follows the Conventional Commits specification, which semantic-release uses to determine version bumps automatically.
Format
<type>(<scope>): <short description>
Types and their version impact
| Type | Bump | Example |
|---|---|---|
fix | patch | fix(api): handle null responses from user endpoint |
feat | minor | feat(map): add layer opacity control |
perf | patch | perf(viewer): reduce re-renders on tile load |
build, ci, docs, refactor, test | patch | docs(readme): update setup instructions |
BREAKING CHANGE: in footer | major | feat!: migrate auth to Auth.js |
References
Semantic versioning
CDT uses semantic-release to automate versioning based on commit messages. It runs in CI when commits land on main or beta.
Version format: MAJOR.MINOR.PATCH
| Version change | When |
|---|---|
PATCH (for example, 1.0.1) | Bug fixes, docs, refactors |
MINOR (for example, 1.2.0) | New backwards-compatible features |
MAJOR (for example, 2.0.0) | Breaking API changes |
How it works
- A maintainer merges a reviewed PR into
mainwith conventional commit messages. semantic-releaseruns in CI, determines the version bump from commit types.- A GitHub release is created automatically with a changelog.
See the semantic-release docs for configuration details.
Forking the repository
The CDT repository is private during the pre-release period. To contribute:
- Ask a team lead to invite you as a collaborator (GitHub docs).
- Accept the email invitation.
- Fork the repo, naming your fork
cdt-{initials}(for example,cdt-dp). - Clone your fork:
git clone https://github.com/<your-username>/cdt-<initials>.git
cd cdt-<initials>
- Copy the
.envfile from your team lead into the project root. - Install dependencies and start the dev server:
yarn # or: npm install
yarn dev # or: npm run dev