-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: edit and reorganize Git Commit Guidelines #3093
Conversation
### Revert | ||
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. | ||
### Header | ||
The header must be a short (50 characters or less) summary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
Should be up to 72 chars.
request conform to commit message format, but since it can't be configured to | ||
have an optional `(<scope>)`, it will claim that messages without it are wrong, | ||
while they're perfectly fine. | ||
**Header** and **body** are mandatory . The **scope** of the header is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the body actually mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
Well, aside from that last small thing PR looks ~ready. I wonder about formatting of .md files though – i.e. I think that it's preferable to have line breaks at least < 100 chars for .md, with <80 chars being preferable. With no to little line breaks working with diffs of markdown files at some point becomes really bothersome. |
When a nice commit featuring all fields is pushed, it could be linked as example.
Yes, fewer columns are better. I ignored it for now because there's no standard in the repo. I can edit all |
reference GitHub issues that this commit **Closes**. | ||
The body contains (in order of appearance) a detailed **description** of the committed changes, references GitHub issues that the commit **closes** and any **breaking changes**. The **description** is mandatory, **closes** and **breaking changes** are optional. | ||
|
||
GitHub issues that the commit **closes** should start with the word `Closes` or `Fixes`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, not really, gh doesn't care – it would work either way. What doesn't work with closes
or fixes
is clog
tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this is not clear enough? Is right below the paragraph describing the parts of the commit message body, thus it should follow that it refers to the commit message and not the GH issue message. Lines addressing
could be appended if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this is not clear enough?
I think that it's wrong to claim that GH requires capital letters, since this is not the case.
Also, now that I look at it, whole sentence is kinda ambiguous, and confusing even when considering the sentence before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ambiguous, and confusing
Must be, because "claim that GH requires capital letters" is not what I meant.
Reorganize the Git Commit Guidelines title hierarchy. Various content edits in the Git Commit Guidelines section: - Remove the footer section and merge its contents with the body - Add revert to the list of possible header types - Change the maximum line length for header and body - Add instructions about the body's elements order
Another thing: |
The subject contains succinct description of the change: | ||
|
||
* use the imperative, present tense: "change" not "changed" nor "changes" | ||
* don't capitalize first letter | ||
* no dot (.) at the end | ||
|
||
A properly formed git commit subject line should always be able to complete the following sentence: | ||
|
||
> If applied, this commit will ___your subject line here___ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I copied the text from here and adapted the format. In that context, a quote looks ad hoc for me. Like quoting the committer's brain.
kehugter (1): docs: edit and reorganize Git Commit Guidelines
Reorganize the Git Commit Guidelines title hierarchy.
Various content edits in the Git Commit Guidelines section:
Addresses #3089