Skip to content

Commit 250bb6d

Browse files
authored
Merge pull request #1235 from HonkingGoose/tpope_blog_fix_quote
Fix Tim Pope blog quote.
2 parents 6956b0c + 65e89e9 commit 250bb6d

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

book/05-distributed-git/sections/contributing.asc

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,30 +59,32 @@ The last thing to keep in mind is the commit message.
5959
Getting in the habit of creating quality commit messages makes using and collaborating with Git a lot easier.
6060
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.
6161
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.
62-
It's also a good idea to use the imperative present tense in these messages.
63-
In other words, use commands.
64-
Instead of ``I added tests for'' or ``Adding tests for,'' use ``Add tests for.''
62+
Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug."
6563
Here is a https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[template originally written by Tim Pope]:
6664

6765
[source,text]
6866
----
69-
Short (50 chars or less) summary of changes
67+
Capitalized, short (50 chars or less) summary
7068
71-
More detailed explanatory text, if necessary. Wrap it to
72-
about 72 characters or so. In some contexts, the first
73-
line is treated as the subject of an email and the rest of
74-
the text as the body. The blank line separating the
75-
summary from the body is critical (unless you omit the body
76-
entirely); tools like rebase can get confused if you run
77-
the two together.
69+
More detailed explanatory text, if necessary. Wrap it to about 72
70+
characters or so. In some contexts, the first line is treated as the
71+
subject of an email and the rest of the text as the body. The blank
72+
line separating the summary from the body is critical (unless you omit
73+
the body entirely); tools like rebase can get confused if you run the
74+
two together.
75+
76+
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
77+
or "Fixes bug." This convention matches up with commit messages generated
78+
by commands like git merge and git revert.
7879
7980
Further paragraphs come after blank lines.
8081
81-
- Bullet points are okay, too
82+
- Bullet points are okay, too
83+
84+
- Typically a hyphen or asterisk is used for the bullet, followed by a
85+
single space, with blank lines in between, but conventions vary here
8286
83-
- Typically a hyphen or asterisk is used for the bullet,
84-
preceded by a single space, with blank lines in
85-
between, but conventions vary here
87+
- Use a hanging indent
8688
----
8789

8890
If all your commit messages follow this model, things will be much easier for you and the developers with whom you collaborate.

0 commit comments

Comments
 (0)