From 9e3c28db46753b428ccd00d2799c4ac794a95f42 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 27 Jan 2026 10:25:36 -1000 Subject: Add git practices section to development guide Document clean history principles: - Never amend, rebase, or force push - Use merge to integrate changes - Keep commits focused and atomic Co-Authored-By: Claude Opus 4.5 --- DESIGN.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'DESIGN.md') diff --git a/DESIGN.md b/DESIGN.md index 32e2d15..87c1f3c 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -544,6 +544,27 @@ func TestHandler_HandleDashboard(t *testing.T) { 5. **Don't add unnecessary comments** - Code should be self-explanatory 6. **Don't create new files unless necessary** - Prefer editing existing 7. **Don't refactor working code** - Only touch what's needed +8. **Don't alter git history** - Never amend, rebase, or force push. Keep a clean, linear history with new commits only. + +### Git Practices + +**Clean history principles:** +- **Never amend commits** - Create new commits for fixes instead +- **Never rebase** - Use merge to integrate changes +- **Never force push** - All pushes should be fast-forward only +- **One logical change per commit** - Keep commits focused and atomic + +**Commit message format:** +``` +Short summary (50 chars or less) + +Optional longer description explaining the why, not the what. +Reference bug numbers with #N format. + +Co-Authored-By: Claude Opus 4.5 +``` + +**If history diverges:** Use `git pull --rebase=false` to merge, never force push. ### Bug Management Workflow -- cgit v1.2.3