# Commit Message

> The note saved with a commit. It says what changed and why.

**Field:** Software Development  
**Category:** Version Control  
**Also known as:** Git Commit Message, Commit Title, Commit Log Message

## Think of it like

Think of it like a note you stick on a box before you store it. It says what is inside and why.

## Definition

A commit message is the note saved with each commit. It says what changed and why. Git's own advice is a short first line of no more than 50 characters, then a blank line. After that comes a longer body if one is needed. The first line is the title that tools show in lists.

## Example

Lucy writes the title Fix the price on the order page. In the body she adds that coupons made tax show twice.

## Example code

```console
$ git commit -m "Fix the price on the order page" -m "Coupons made the tax show up twice."
[main 7b8c9d0] Fix the price on the order page
 1 file changed, 2 insertions(+), 1 deletion(-)
```

The first -m is the title. The second -m is the body.

## Why it matters

Months later, the message is often the only clue to why a line was changed.

## Common mistake

Writing fix or stuff. A message that says nothing is no help when you search the history.

## Three principles

- **Short title.** No more than 50 characters.
- **Say why.** The diff shows what. Say why.
- **Blank line.** Leave one between title and body.

## Related terms

- [Commit](https://learn.benibix.com/term/development/commit)
- [Git Log](https://learn.benibix.com/term/development/git-log)
- [Commit Hash](https://learn.benibix.com/term/development/commit-hash)
- [Code Review](https://learn.benibix.com/term/development/code-review)

## Taught in

- [Git Log and Git Diff](https://learn.benibix.com/learn/development-version-control/git-log-and-git-diff): Git and GitHub, 3/13

![One commit drawn as a card. At the top, its hash, a long code of letters and numbers, with the first seven characters lit up as the short form. Below it, the author Emma and the date. Then the message: a title line under 50 characters, a blank line, and a body that says why. To the right, git log lists three commits, newest first, each as a short hash and its title.](https://learn.benibix.com/diagrams/dev3-commit-anatomy.svg)

---

Source: https://learn.benibix.com/term/development/commit-message
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
