Skip to content

Commit 08ceb83

Browse files
committed
docs: add squash commit guidance - keep history clean
Why: Project maintains clean linear history via squash merges Approach: Added guidance to GitHub Integration and workflow sections Learned: Important to document that branch commits can be messy, squash on merge Next: Update PR description to reflect this addition 🤖 Claude <[email protected]>
1 parent 1f77701 commit 08ceb83

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

BOTS.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ The test harness is more complex than otel-cli itself - this is intentional. We
6666
git log --oneline -n 10
6767
git show HEAD
6868

69-
# 2. WORK: Track your progress
69+
# 2. WORK: Track your progress (commit often in your branch)
7070
git add <files>
7171
git commit -m "type: what you're building"
7272

7373
# 3. PERSIST: Save your state
7474
git push origin <branch>
75+
76+
# 4. MERGE: Squash commits when merging to main
77+
# PRs are squashed on merge to keep main history clean
7578
```
7679

7780
### The Universal Commit Message Template
@@ -309,6 +312,21 @@ gh issue view <number> # Read issue details
309312
gh issue create # Create new issue
310313
```
311314

315+
**Squash Commits on Merge:**
316+
317+
This project maintains a clean, linear history through squash commits:
318+
319+
- **Work in branches**: Make as many commits as needed during development
320+
- **Rich commit messages**: Document your journey in branch commits
321+
- **Squash on merge**: PRs are squashed into a single commit on main
322+
- **Final commit message**: Should summarize the entire PR, not just the last commit
323+
324+
When creating a PR, write a good description - it becomes the squash commit message. Include:
325+
- What changed and why
326+
- Key decisions made
327+
- Any gotchas or learnings
328+
- Tests added or modified
329+
312330
## 📦 Versioning & Releases
313331

314332
**Semantic versioning:** MAJOR.MINOR.PATCH (e.g., 0.5.0)
@@ -351,9 +369,10 @@ gh issue create # Create new issue
351369

352370
1. **All tests pass** - `go build && go test && go test ./...`
353371
2. **Code formatted** - `go fmt ./...`
354-
3. **Commit with attribution** - Use the template above
355-
4. **Push and create PR** - Reference the issue
372+
3. **Commit with attribution** - Use the template above (multiple commits OK in branch)
373+
4. **Push and create PR** - Reference the issue with good description
356374
5. **Update issue** - Mark as complete or pending review
375+
6. **Squash on merge** - PRs are squashed to keep main history clean
357376

358377
## 🤝 Cross-Model Collaboration
359378

0 commit comments

Comments
 (0)