Git Best Practices¶
Branching Strategy¶
See ADR-0001 for the full decision.
| Repo | Strategy | Branch rules |
|---|---|---|
| archon-platform | Trunk-based | feature/* -> main |
| archon-apps IT | Trunk-based | feature/* -> main |
| archon-apps OT | GitFlow | feature/ -> develop -> release/ -> main |
| archon-cloud | Trunk-based | feature/* -> main |
| archon-pipelines | Trunk-based | feature/* -> main |
Commit Messages¶
Use Conventional Commits format:
<type>(<scope>): <description>
feat(ansible): add common role with NTP and timezone config
fix(esp32): correct HC-SR04 trigger pin assignment
docs(adr): add ADR-0003 grype over trivy decision
chore(deps): update mkdocs-material to 9.5
refactor(docker): split docker role tasks into install and configure
Types: feat, fix, docs, chore, refactor, test, ci
Branch Naming¶
feature/ansible-common-role
feature/esp32-rain-sensor
fix/mqtt-reconnect-timeout
hotfix/influxdb-disk-full
release/ot-1.2.0
Pull Request Rules¶
All PRs to main must have:
- [ ] Linked work item (ADO Product Backlog Item)
- [ ] 1 reviewer approval (self-approve allowed solo)
- [ ] All comments resolved
- [ ] Pipeline passes (once pipelines exist)
- [ ] Squash merge only (keeps main history clean)
Feature Branch Lifetime¶
| Workload | Max branch age |
|---|---|
| IT feature branch | 72 hours |
| OT feature branch | No limit (GitFlow) |
| OT release branch | Until deployed to prod |
| Hotfix | 24 hours |
What NOT to Commit¶
- Secrets, tokens, passwords — use Infisical
- Binary files over 1MB — use artifact storage
- Generated files — add to .gitignore
- Personal editor config — use .gitignore