docs: improve commit message format documentation (#39705)
PR Close #39705
This commit is contained in:
parent
2eae0c2ebb
commit
b0c4ecf563
|
@ -227,10 +227,10 @@ Each commit message consists of a **header**, a **body**, and a **footer**.
|
|||
|
||||
The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
|
||||
|
||||
The `body` is mandatory for all commits except for those of scope "docs".
|
||||
When the body is required it must be at least 20 characters long.
|
||||
The `body` is mandatory for all commits except for those of type "docs".
|
||||
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
|
||||
|
||||
The `footer` is optional.
|
||||
The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
|
||||
|
||||
Any line of the commit message cannot be longer than 100 characters.
|
||||
|
||||
|
@ -321,7 +321,7 @@ Use the summary field to provide a succinct description of the change:
|
|||
* no dot (.) at the end
|
||||
|
||||
|
||||
#### Commit Message Body
|
||||
#### <a name="commit-body"></a>Commit Message Body
|
||||
|
||||
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
|
||||
|
||||
|
@ -329,7 +329,7 @@ Explain the motivation for the change in the commit message body. This commit me
|
|||
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
|
||||
|
||||
|
||||
#### Commit Message Footer
|
||||
#### <a name="commit-footer"></a>Commit Message Footer
|
||||
|
||||
The footer can contain information about breaking changes and is also the place to reference GitHub issues, Jira tickets, and other PRs that this commit closes or is related to.
|
||||
|
||||
|
|
Loading…
Reference in New Issue