|
| 1 | +.. include:: /Includes.rst.txt |
| 2 | +.. index:: ! Commit messages |
| 3 | +.. _commit-messages: |
| 4 | + |
| 5 | +================ |
| 6 | +Commit messages |
| 7 | +================ |
| 8 | + |
| 9 | +These conventions apply to every contribution, no matter whether you make |
| 10 | +your change :ref:`directly on GitHub <docs-contribute-github-method>` or |
| 11 | +:ref:`locally with Docker <docs-contribute-git-docker>`. |
| 12 | + |
| 13 | +.. literalinclude:: /_CodeSnippets/_CommitMessageExample.txt |
| 14 | + :caption: Example commit message |
| 15 | + :language: text |
| 16 | + |
| 17 | +If the change is related to a changelog entry, a Gerrit change, or an |
| 18 | +issue, mention it too: |
| 19 | + |
| 20 | +.. literalinclude:: /_CodeSnippets/_ChangelogCommitMessageExample.txt |
| 21 | + :caption: Example commit message referencing a changelog issue |
| 22 | + :language: text |
| 23 | + |
| 24 | +.. _commit-messages-format: |
| 25 | + |
| 26 | +Format |
| 27 | +====== |
| 28 | + |
| 29 | +* Prefix the summary line with the type of change -- `[TASK]`, |
| 30 | + `[BUGFIX]` or `[FEATURE]` -- followed by a short, imperative summary. |
| 31 | + |
| 32 | +* Explain *why* the change is needed in the body. The diff already shows |
| 33 | + what changed; the body should cover what the diff cannot. |
| 34 | + |
| 35 | +* End with a `Signed-off-by: Your Name` trailer. Add an |
| 36 | + `Assisted-by: <tool/model name> <contact>` trailer too, if you used AI |
| 37 | + assistance for more than a basic spelling or grammar check. |
| 38 | + |
| 39 | +* If the change is related to a changelog entry, mention that changelog |
| 40 | + entry. If it is related to a Gerrit change that had no changelog |
| 41 | + entry, mention that Gerrit change instead. If it is related to an |
| 42 | + issue, mention the issue number. |
| 43 | + |
| 44 | +* If the manual has branches per version, add a line like |
| 45 | + `Releases: main, 14.3` to note which versions your change applies to |
| 46 | + (see :ref:`review policy <review-policy>`). Backporting to those |
| 47 | + branches then happens automatically (see :ref:`backport changes |
| 48 | + <backport-changes>`) -- manual backporting is only needed if the |
| 49 | + automatic backport hits a conflict or the content needs to be |
| 50 | + adjusted per version. |
0 commit comments