Home

CommitMessages

CommitMessages are the textual descriptions attached to commits in a version control system, most commonly Git. They document why a change was made, what was changed, and how it relates to the project’s history. Clear messages help code reviews, debugging, and release notes, and they enable developers to understand the project’s evolution over time.

A typical commit message has three parts: a subject line, an optional body, and an optional footer.

Many teams adopt standardized conventions to improve consistency. The Conventional Commits specification categorizes messages with a

Best practices include keeping commits small and focused, writing messages after the change is made, and ensuring

The
subject
should
be
a
concise
summary
of
the
change,
written
in
present
tense
and
imperative
mood
(for
example,
"Add
user
authentication"
or
"Fix
memory
leak
in
data
cache").
The
subject
is
usually
limited
to
around
50
characters
and
should
not
end
with
a
period.
The
body,
when
present,
provides
a
more
detailed
explanation
of
the
motivation,
alternatives
considered,
and
any
side
effects.
The
footer
can
reference
related
issues
or
breaking
changes,
using
conventions
like
"Closes
#123"
or
"BREAKING
CHANGE:
...".
type
such
as
feat,
fix,
docs,
style,
refactor,
perf,
test,
build,
ci,
chore,
or
revert,
followed
by
a
colon
and
a
short
description.
Examples:
"feat:
add
OAuth
login"
or
"fix:
correct
off-by-one
error
in
loop".
Tools
like
commitlint
and
semantic-release
can
enforce
these
rules
and
automatically
generate
changelogs
based
on
the
commit
history.
the
message
communicates
intent
clearly
rather
than
merely
describing
the
code
change.
Consistent
commit
messages
improve
collaboration,
automation,
and
project
maintainability.