296
edits
Carandraug (talk | contribs) (add more examples and explanation from the manual) |
(→One-line description: reword for clarity, add build prefix) |
||
Line 24: | Line 24: | ||
=== One-line description === | === One-line description === | ||
The commit message should | The commit message should start with a brief one-line description of what the | ||
commit does. Keep it short, | commit does. Keep it short, no longer than 80 characters. If you are working | ||
on a bug or applying a patch, this one-line explanation should mention the bug | |||
at the end like so: {{codeline|... (bug #12345)}}. | or patch number at the end like so: {{codeline|... (bug #12345)}}. Do not end | ||
the first line with a period (full stop). | |||
If your change only touches one file, then the | If your change only touches one file, then the name of that file can be the | ||
be the prefix of the one-line description. If it's a C++ or C file, the | prefix of the one-line description. If it's a C++ or C file, the function or | ||
function or class that is being modified should be included in the | class that is being modified should be included in the parenthetical remark, | ||
parenthetical remark, as in the full body of the commit message. | as in the full body of the commit message. | ||
In addition, there are | In addition, there are a few prefixes for certain types of commits: | ||
* maint: for reorganisation of the sources that do not change the source. Regular merge commits are a prominent example. | * maint: for reorganisation of the sources that do not change the source. Regular merge commits are a prominent example. | ||
* doc: for changes to the documentation. | * doc: for changes to the documentation. | ||
* build: for changes to the build system, for example autoconf or automake files. | |||
If your change is small and only touches one file then | If your change is small and only touches one file, then the one-line | ||
description may serve as the entire commit message. | |||
=== Body of the commit message === | === Body of the commit message === |
edits