liveBook · Manning

Commit message

As explained in The Art of Code

A commit message is text attached to a version-control commit that summarizes the intent and reasoning of a change.

A commit message preserves the intent behind a change. Treat it as lightweight documentation and preventive maintenance: write a clean, purposeful history that future readers can understand without reverse engineering the code. section 3.2.1

A readable commit structure

Subject: state the intent of the change Body: explain the reasoning when necessary Related ticket: preserve traceability when relevant Keep one feature together rather than scattering it across several commits. section 3.2.1

Use commit messages to reduce future cognitive load:

  • Lead with a concise subject line that states intent. section 3.2.1
  • Add the reasoning behind the change when the subject is insufficient. section 3.2.1
  • Reference related tickets when traceability matters. section 3.2.1

How The Art of Code covers it

How deep it goes
Defines subjects, optional reasoning bodies, ticket references, and feature-sized history, without prescribing exact wording.
Examples
Uses concise subjects, explanatory bodies, related tickets, and single-feature commits as practical forms.
What you can do after
Apply it by stating intent concisely, adding reasoning when needed, linking tickets, and keeping each feature’s history coherent.
How it connects
Connects commit messages with code review, documentation, traceability, and version control.

Also explained in

Compare how 2 books explain commit message →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of Code. The section links point to the parts of the book it draws on.