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