Skip to main content
btheo.com btheo.com > press start to play
NEW POST: NODE.JS SECURITY 2025 OPEN FOR FREELANCE 10+ YEARS EXP REACT × NODE × AWS NEW POST: NODE.JS SECURITY 2025 OPEN FOR FREELANCE 10+ YEARS EXP REACT × NODE × AWS
TIL · 04 MAR 2026 · NOTE #024 ESC
TIL NOTE #024

One Thing Per Commit

Bad commit:

commit abc1234
- Add dark mode feature
- Fix auth bug
- Refactor database layer
- Update docs

Six months later, a feature breaks. You git bisect. The commit that introduced it also has four other changes. Which one broke it? Unknown.

Good commits:

commit abc1234
Add dark mode CSS variables
commit abc1235
Wire dark mode toggle to localStorage
commit abc1236
Fix auth token expiry bug
commit abc1237
Refactor database connection pool

Each commit is atomic — it does one thing. You can revert it, cherry-pick it, understand it.

Commit messages that work:

Add dark mode toggle to settings
Fix race condition in token refresh
Extract cache layer to separate module

wip
fix stuff
checkpoint

Discipline compounds. One thing per commit. Bisect catches bugs in seconds. The blame is clear. New developers can read the history.

Commit early, commit often. One thing at a time.