@@ -98,15 +98,28 @@ $ git commit
9898Writing good commit logs is important. A commit log should describe what
9999changed and why. Follow these guidelines when writing one:
100100
101- 1 . The first line should be 50 characters or less and contain a short
102- description of the change. All words in the description should be in
103- lowercase with the exception of proper nouns, acronyms, and the ones that
104- refer to code, like function/variable names. The description should
105- be prefixed with the name of the changed subsystem and start with an
106- imperative verb. Example: "net: add localAddress and localPort
107- to Socket"
101+ 1 . The first line should:
102+ - contain a short description of the change
103+ - be 50 characters or less
104+ - be entirely in lowercase with the exception of proper nouns, acronyms, and
105+ the words that refer to code, like function/variable names
106+ - be prefixed with the name of the changed subsystem and start with an
107+ imperative verb. Examples: "net: add localAddress and localPort
108+ to Socket", "src: fix typos in node_lttng_provider.h"
109+ - be meaningful; it is what other people see when they
110+ run ` git shortlog ` or ` git log --oneline ` .<br >
111+ Check the output of ` git log --oneline files/you/changed ` to find out
112+ what subsystem (or subsystems) your changes touch
1081132 . Keep the second line blank.
1091143 . Wrap all other lines at 72 columns.
115+ - If your patch fixes an open issue, you can add a reference to it at the end
116+ of the log. Use the ` Fixes: ` prefix and the full issue URL. For other references
117+ use ` Refs: ` . For example:
118+ ``` txt
119+ Fixes: https://github.com/nodejs/node/issues/1337
120+ Refs: http://eslint.org/docs/rules/space-in-parens.html
121+ Refs: https://github.com/nodejs/node/pull/3615
122+ ```
110123
111124A good commit log can look something like this:
112125
@@ -121,22 +134,9 @@ The body of the commit message can be several paragraphs, and
121134please do proper word-wrap and keep columns shorter than about
12213572 characters or so. That way, `git log` will show things
123136nicely even when it is indented.
124- ```
125-
126- The header line should be meaningful; it is what other people see when they
127- run ` git shortlog ` or ` git log --oneline ` .
128-
129- Check the output of ` git log --oneline files_that_you_changed ` to find out
130- what subsystem (or subsystems) your changes touch.
131137
132- If your patch fixes an open issue, you can add a reference to it at the end
133- of the log. Use the ` Fixes: ` prefix and the full issue URL. For other references
134- use ` Refs: ` . For example:
135-
136- ``` txt
137138Fixes: https://github.com/nodejs/node/issues/1337
138139Refs: http://eslint.org/docs/rules/space-in-parens.html
139- Refs: https://github.com/nodejs/node/pull/3615
140140```
141141
142142### Step 4: Rebase
@@ -200,9 +200,6 @@ core modules.
200200$ git push origin my-branch
201201```
202202
203- Go to https://github.com/yourusername/node and select your branch.
204- Click the 'Pull Request' button and fill out the form.
205-
206203Pull requests are usually reviewed within a few days.
207204
208205### Step 7: Discuss and update
0 commit comments