Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit message guidelines

hjnilsson edited this page Jul 27, 2012 · 1 revision

Good commit messages serve at least three important purposes:

  • To speed up the reviewing process (for patches).

  • To help us write a good release notes.

  • To help the future maintainers of OpenTibia, say five years into the future, to find out why a particular change was made to the code or why a specific feature was added.

  • To make git log --oneline display sane output.

Structure your commit message like this:

Summarize clearly in one line what the commit is about

Describe the problem the commit solves or the use
case for a new feature. Justify why you chose
the particular solution.

DO

  • Write the summary line and description of what you in past tense. Write "fixed", "added", "changed" instead of "fix", "add", "change". (This is contrary to the general git guidelines followed by the Linux kernel).

  • Always leave the second line blank.

  • Line break the commit message (to make the commit message readable without having to scroll horizontally in @gitk@) at 72 characters.

DO NOT

  • Nothing here yet.

Tips

  • If it seems difficult to summarize what your commit does, it may be because it includes several logical changes or bug fixes, and are better split up into several commits using git add -p.

References

The following blog post has a nice discussion of commit messages:

"On commit messages":http://who-t.blogspot.com/2009/12/on-commit-messages.html

This article is based on https://github.com/erlang/otp/wiki/Writing-good-commit-messages

Clone this wiki locally