@@ -98,15 +98,28 @@ $ git commit
98
98
Writing good commit logs is important. A commit log should describe what
99
99
changed and why. Follow these guidelines when writing one:
100
100
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
108
113
2 . Keep the second line blank.
109
114
3 . 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
+ ```
110
123
111
124
A good commit log can look something like this:
112
125
@@ -121,22 +134,9 @@ The body of the commit message can be several paragraphs, and
121
134
please do proper word-wrap and keep columns shorter than about
122
135
72 characters or so. That way, `git log` will show things
123
136
nicely 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.
131
137
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
137
138
Fixes: https://github.com/nodejs/node/issues/1337
138
139
Refs: http://eslint.org/docs/rules/space-in-parens.html
139
- Refs: https://github.com/nodejs/node/pull/3615
140
140
```
141
141
142
142
### Step 4: Rebase
@@ -200,9 +200,6 @@ core modules.
200
200
$ git push origin my-branch
201
201
```
202
202
203
- Go to https://github.com/yourusername/node and select your branch.
204
- Click the 'Pull Request' button and fill out the form.
205
-
206
203
Pull requests are usually reviewed within a few days.
207
204
208
205
### Step 7: Discuss and update
0 commit comments