Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GIT Commit Message Format

Commit Message Format

[FEATURE] Short summary of changes introduced by this patch

More detailed explanatory text, if necessary. Wrap it to ca 74 characters.
The first line is treated as the subject of the commit message and
the rest of the text as the body. The blank line separating the
subject from the body is critical (unless you omit the body entirely).

Write your commit message in the imperative present tense ("Fix bug"
and not "Fixed bug"), since a commit is a set of instructions for
how to go from a previous state to the new state and the commit
message should describe this process. This convention matches up with
generated commit messages by commands like git merge and git revert.

The title has to have one of these prefixes: [BUGFIX] (fixes a bug),
[FEATURE] (any new feature, also small additions) and [TASK]
(none of the above, e.g. code cleanup).
These flags might be added additionally: [!!] (breaking change),
[DB] (the database definition needs to be updated), [CONF]
(some configuration changed), [SECURITY] (fix a security issue).

Help others to understand what you did (Motivation for the change?
Whats the difference to the previous version?).
Keep it simple and avoid repeating information that is already
contained in the issue tracker (descriptions how to reproduce a bug
should remain in the ticket).

Add relationships to the issue tracker at the bottom of the commit message,
using common tags like "Ref", see

* Bullet points are okay, too
* An asterisk is used for the bullet

Resolve #42
Ref #4 #8 #15 #16



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment