From afaf2bc5ce6e2d4c091775f3dce215bdb01585ff Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Tue, 26 Mar 2019 22:36:41 +0100 Subject: [PATCH 1/2] Fix quote from Tim Pope's blog. --- .../sections/contributing.asc | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/book/05-distributed-git/sections/contributing.asc b/book/05-distributed-git/sections/contributing.asc index 3302a198f..253d59aed 100644 --- a/book/05-distributed-git/sections/contributing.asc +++ b/book/05-distributed-git/sections/contributing.asc @@ -66,23 +66,27 @@ Here is a https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[ [source,text] ---- -Short (50 chars or less) summary of changes +Capitalized, short (50 chars or less) summary -More detailed explanatory text, if necessary. Wrap it to -about 72 characters or so. In some contexts, the first -line is treated as the subject of an email and the rest of -the text as the body. The blank line separating the -summary from the body is critical (unless you omit the body -entirely); tools like rebase can get confused if you run -the two together. +More detailed explanatory text, if necessary. Wrap it to about 72 +characters or so. In some contexts, the first line is treated as the +subject of an email and the rest of the text as the body. The blank +line separating the summary from the body is critical (unless you omit +the body entirely); tools like rebase can get confused if you run the +two together. + +Write your commit message in the imperative: "Fix bug" and not "Fixed bug" +or "Fixes bug." This convention matches up with commit messages generated +by commands like git merge and git revert. Further paragraphs come after blank lines. - - Bullet points are okay, too +- Bullet points are okay, too + +- Typically a hyphen or asterisk is used for the bullet, followed by a + single space, with blank lines in between, but conventions vary here - - Typically a hyphen or asterisk is used for the bullet, - preceded by a single space, with blank lines in - between, but conventions vary here +- Use a hanging indent ---- If all your commit messages follow this model, things will be much easier for you and the developers with whom you collaborate. From 65e89e97fa8b30624ac7b76c3b95bdd46a30474d Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Tue, 26 Mar 2019 22:51:24 +0100 Subject: [PATCH 2/2] Clarify commit message style. --- book/05-distributed-git/sections/contributing.asc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/book/05-distributed-git/sections/contributing.asc b/book/05-distributed-git/sections/contributing.asc index 253d59aed..56a13aa24 100644 --- a/book/05-distributed-git/sections/contributing.asc +++ b/book/05-distributed-git/sections/contributing.asc @@ -59,9 +59,7 @@ The last thing to keep in mind is the commit message. Getting in the habit of creating quality commit messages makes using and collaborating with Git a lot easier. As a general rule, your messages should start with a single line that's no more than about 50 characters and that describes the changeset concisely, followed by a blank line, followed by a more detailed explanation. The Git project requires that the more detailed explanation include your motivation for the change and contrast its implementation with previous behavior -- this is a good guideline to follow. -It's also a good idea to use the imperative present tense in these messages. -In other words, use commands. -Instead of ``I added tests for'' or ``Adding tests for,'' use ``Add tests for.'' +Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug." Here is a https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[template originally written by Tim Pope]: [source,text]