-
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
-
⚠️ 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.
git fetch --all
git switch dev # or main for hotfixes
git pull origin dev # ensure up to date
git submodule update --init --recursive --remotecd 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 submodule update --remote frontend # or backend
git add frontend
git commit -m "chore(submodule): bump frontend to <sha> for ui/capture-panel"
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