-
Notifications
You must be signed in to change notification settings - Fork 0
Git workflow
This guide explains how we work with Git, branches, pull requests, and Docker to ensure smooth collaboration across the super-repo and its submodules.
-
Super-repo (this repository): Holds orchestration (
docker-compose.yml), environment examples, documentation, and submodule pointers. -
Submodules:
-
frontend/→ SvelteKit application -
backend/→ FastAPI application -
wiki/→ this developer wiki
-
⚠️ Most day-to-day coding happens inside the submodule repos. The super-repo is responsible for keeping everything in sync.
We follow a Gitflow-style workflow:
-
main→ production-ready code only (tagged releases). -
dev→ integration branch for reviewed contributions.
-
Always branch from
dev. -
Use the format:
<area>/<short-description>Examples:
ui/capture-panelapi/upload-endpointops/docker-compose-prod
-
For urgent fixes from
main:hotfix/<issue>Merge back into
mainand then forward intodev.
dev and main are protected on all three repos: every change lands through a pull request with at least one approving review — no direct pushes, no force-pushes, no branch deletions, and open conversation threads must be resolved before merge. This applies to everyone, maintainers included; we don't bypass review as routine practice even where admin permissions technically allow it.
The path a change takes:
- Branch from
dev(<area>/<short-description>), open a PR intodev, get one review, and merge. - Changes are integrated and tested on
dev. - When
devis ready for release, open a PR fromdevintomain, merge after review, and tag the release onmain.
git fetch --all
git switch dev # or main for hotfixes
git pull origin dev # ensure up to date
git submodule update --init --recursive # take the exact pins the super-repo records (no --remote)cd frontend
git checkout dev
git pull origin dev
git checkout -b ui/capture-panelDo your work, commit often, then push:
git push -u origin ui/capture-panel- Target branch:
dev - Request at least 1 reviewer
After merging in the submodule:
cd ..
git checkout dev
git pull origin dev
git -C frontend fetch origin # or backend
git -C frontend checkout <merged-sha> # the exact commit merged in the submodule PR
# (read it with: git -C frontend rev-parse --short HEAD)
git add frontend
git commit -m "chore(submodule): bump frontend to <short-sha>"
git pushOpen a PR in the super-repo (target: dev).
-
Write atomic, descriptive commits:
feat(api): add /upload endpointfix(ui): handle 404 from /healthchore(docs): add onboarding guide
- Code builds & runs in Docker (
docker compose up --build) - Tests pass (if available)
- Commit messages are meaningful
- No unresolved merge conflicts
- Documentation updated if needed
- Reviewers assigned
All development happens inside Docker. You do not need to install Node.js or Python locally.
-
Start:
docker compose up --build
-
Frontend: http://localhost:5173
-
Backend: http://localhost:8000/health
Switching branches safely:
-
If only source files changed: just
git checkout <branch> -
If dependencies changed (
package*.jsonorrequirements.txt):docker compose down -v docker compose up --build
- Submodules: merge
dev → main, tag (e.g.,v0.2.0), CI builds Docker images. - Super-repo: update submodule pointers, merge
dev → main, tag release. - Deliverables published openly (per Data Management Plan).
- Mon–Thu: work in feature branches
-
Fri: review PRs → merge into
dev(submodules first, then super-repo) -
Milestone complete: merge
dev → main, tag, release notes