@@ -90,6 +90,13 @@ $ git config --global user.name "J. Random User"
90
90
$ git config --global user.email "[email protected] "
91
91
```
92
92
93
+ Add and commit:
94
+
95
+ ``` text
96
+ $ git add my/changed/files
97
+ $ git commit
98
+ ```
99
+
93
100
Writing good commit logs is important. A commit log should describe what
94
101
changed and why. Follow these guidelines when writing one:
95
102
@@ -191,10 +198,60 @@ $ git push origin my-branch
191
198
Go to https://github.com/yourusername/node and select your branch.
192
199
Click the 'Pull Request' button and fill out the form.
193
200
194
- Pull requests are usually reviewed within a few days. If there are comments
195
- to address, apply your changes in a separate commit and push that to your
196
- branch. Post a comment in the pull request afterwards; GitHub does
197
- not send out notifications when you add commits.
201
+ Pull requests are usually reviewed within a few days.
202
+
203
+ ### Step 7: Discuss and update
204
+
205
+ You will probably get feedback or requests for changes to your Pull Request.
206
+ This is a big part of the submission process, so don't be disheartened!
207
+
208
+ To make changes to an existing Pull Request, make the changes to your branch.
209
+ When you push that branch to your fork, GitHub will automatically update the
210
+ Pull Request.
211
+
212
+ You can push more commits to your branch:
213
+
214
+ ``` text
215
+ $ git add my/changed/files
216
+ $ git commit
217
+ $ git push origin my-branch
218
+ ```
219
+
220
+ Or you can rebase against master:
221
+
222
+ ``` text
223
+ $ git fetch --all
224
+ $ git rebase origin/master
225
+ $ git push --force-with-lease origin my-branch
226
+ ```
227
+
228
+ Or you can amend the last commit (for example if you want to change the commit
229
+ log).
230
+
231
+ ``` text
232
+ $ git add any/changed/files
233
+ $ git commit --amend
234
+ $ git push --force-with-lease origin my-branch
235
+ ```
236
+
237
+ ** Important:** The ` git push --force-with-lease ` command is one of the few ways
238
+ to delete history in git. Before you use it, make sure you understand the risks.
239
+ If in doubt, you can always ask for guidance in the Pull Request or on
240
+ [ IRC in the #node-dev channel] ( https://webchat.freenode.net?channels=node-dev&uio=d4 ) .
241
+
242
+ Feel free to post a comment in the Pull Request to ping reviewers if you are
243
+ awaiting an answer on something.
244
+
245
+
246
+ ### Step 8: Landing
247
+
248
+ Once your Pull Request has been reviewed and approved by at least one Node.js
249
+ Collaborators (often by saying LGTM, or Looks Good To Me), and as long as
250
+ there is consensus (no objections from a Collaborator), a
251
+ Collaborator can merge the Pull Request . GitHub often shows the Pull Request as
252
+ ` Closed ` at this point, but don't worry. If you look at the branch you raised
253
+ your Pull Request against (probably ` master ` ), you should see a commit with
254
+ your name on it. Congratulations and thanks for your contribution!
198
255
199
256
<a id =" developers-certificate-of-origin " ></a >
200
257
## Developer's Certificate of Origin 1.1
0 commit comments