Git Workflow
Branches
Section titled “Branches”| Branch | Purpose |
|---|---|
main | Always deployable |
feat/xxx | Features |
fix/xxx | Bug fixes |
docs/xxx | Documentation only |
refactor/xxx | No behavior change |
Commits
Section titled “Commits”Use Conventional Commits. Keep them short.
Format
Section titled “Format”type(scope): descriptionExamples
Section titled “Examples”feat(core): add galaxy type definitionsfix(ui): correct axis scale on scatter plotdocs: add data sources to handbookrefactor(viz): extract d3 bindingschore: update dependenciesfeat— New featurefix— Bug fixdocs— Documentation onlyrefactor— Code change that doesn’t fix bug or add featuretest— Adding or fixing testschore— Maintenance tasks
- Present tense (“add” not “added”)
- Lowercase
- No period at end
- Body only if necessary
- Keep under 72 characters
Pull Requests
Section titled “Pull Requests”Follow commit format:
feat(core): add coordinate transformsDescription Template
Section titled “Description Template”## What[One sentence describing what this PR does]
## Why[Optional if obvious from the issue]
## Notes[Optional implementation details or decisions]Checklist
Section titled “Checklist”Before requesting review:
- Tests pass (
pnpm nx affected -t test) - Lint clean (
pnpm nx affected -t lint) - Types complete (no
any) - Commits are clean (rebase if needed)
History Management
Section titled “History Management”Rebase Before Merge
Section titled “Rebase Before Merge”git fetch origingit rebase origin/mainSquash Only If Messy
Section titled “Squash Only If Messy”If your commits tell a clear story, keep them. If they’re “fix typo” and “oops”, squash.
Each Commit Builds
Section titled “Each Commit Builds”Every commit in history should:
- Build successfully
- Pass tests
- Be meaningful on its own
No “Fix Typo” Commits
Section titled “No “Fix Typo” Commits”Amend instead:
git add .git commit --amend --no-edit