StoicBuilder

HandbookIX the CuriaA readable commit history

IXthe Curia, Work as a team

A readable commit history

1 min readUpdated 28 November

In plain words

A readable history has one logical change per commit, each with a message saying what changed and why, so teammates can review it, find when a bug appeared and revert one step cleanly.

Where you see it

A bug turns up in Harbor's invoices and git blame points to a commit called wip. A history in the Conventional Commits style reads more like a log of decisions: feat(billing): add annual plans, then fix(invoices): round tax per line item.

Terminalterminal
$ git log --oneline -49c1e0a7 fix(invoices): round tax per line item, not on the total4b7d2f1 feat(billing): add annual pricing for Pro and Teame02a9c3 refactor(billing): move plan prices into plans.ts71f3b88 test(billing): cover proration on the last day of a period
type(scope): summary. Tools can read the type to draft changelogs and suggest the next version number.

What goes wrong

  1. One commit that does five things

    A commit that renames files, fixes a bug and adds a feature can't be reverted without losing all three. Commit each logical change on its own; git add -p lets you stage part of a file.

  2. Checkpoint commits landing on main

    Forty commits named wip or Update file are fine on a branch and useless in main's history. Squash them into one or a few clear commits when you merge.

  3. Messages that say what but not why

    fix rounding repeats what the diff already shows. Add the reason in the body: which invoices were wrong and which rule they follow now.

    git commit -m "fix rounding"

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Write commit messages in the Conventional Commits format, type(scope): summary, with a body explaining why whenever it isn't obvious. Keep one logical change per commit, and before I open the pull request, propose how to squash the work-in-progress commits into a few clear ones.

Quick check

Sign in to earn +10 XP for it

Six months from now, someone runs git blame on Harbor's tax code. Which commit message helps them most?

Got a prompt that touches A readable commit history?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.