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