• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Node.js Collaborator Guide
2
3## Contents
4
5* [Issues and pull requests](#issues-and-pull-requests)
6  * [Welcoming first-time contributors](#welcoming-first-time-contributors)
7  * [Closing issues and pull requests](#closing-issues-and-pull-requests)
8  * [Author ready pull requests](#author-ready-pull-requests)
9  * [Handling own pull requests](#handling-own-pull-requests)
10* [Accepting modifications](#accepting-modifications)
11  * [Code reviews](#code-reviews)
12  * [Consensus seeking](#consensus-seeking)
13  * [Waiting for approvals](#waiting-for-approvals)
14  * [Testing and CI](#testing-and-ci)
15    * [Useful CI jobs](#useful-ci-jobs)
16    * [Starting a CI job](#starting-a-ci-job)
17  * [Internal vs. public API](#internal-vs-public-api)
18  * [Breaking changes](#breaking-changes)
19    * [Breaking changes and deprecations](#breaking-changes-and-deprecations)
20    * [Breaking changes to internal elements](#breaking-changes-to-internal-elements)
21    * [Unintended breaking changes](#unintended-breaking-changes)
22      * [Reverting commits](#reverting-commits)
23  * [Introducing new modules](#introducing-new-modules)
24  * [Additions to N-API](#additions-to-n-api)
25  * [Deprecations](#deprecations)
26  * [Involving the TSC](#involving-the-tsc)
27* [Landing pull requests](#landing-pull-requests)
28  * [Using `git-node`](#using-git-node)
29  * [Technical HOWTO](#technical-howto)
30  * [Troubleshooting](#troubleshooting)
31  * [I made a mistake](#i-made-a-mistake)
32  * [Long term support](#long-term-support)
33    * [What is LTS?](#what-is-lts)
34    * [How are LTS branches managed?](#how-are-lts-branches-managed)
35    * [How can I help?](#how-can-i-help)
36* [Who to CC in the issue tracker](#who-to-cc-in-the-issue-tracker)
37
38This document explains how Collaborators manage the Node.js project.
39Collaborators should understand the
40[guidelines for new contributors](../../CONTRIBUTING.md) and the
41[project governance model](../../GOVERNANCE.md).
42
43## Issues and pull requests
44
45Mind these guidelines, the opinions of other Collaborators, and guidance of the
46[TSC][]. Notify other qualified parties for more input on an issue or a pull
47request. See [Who to CC in the issue tracker](#who-to-cc-in-the-issue-tracker).
48
49### Welcoming first-time contributors
50
51Always show courtesy to individuals submitting issues and pull requests. Be
52welcoming to first-time contributors, identified by the GitHub
53![First-time contributor](../first_timer_badge.png) badge.
54
55For first-time contributors, check if the commit author is the same as the pull
56request author. This way, once their pull request lands, GitHub will show them
57as a _Contributor_. Ask if they have configured their git
58[username][git-username] and [email][git-email] to their liking.
59
60### Closing issues and pull requests
61
62Collaborators can close any issue or pull request that is not relevant to the
63future of the Node.js project. Where this is unclear, leave the issue or pull
64request open for several days to allow for discussion. Where this does not yield
65evidence that the issue or pull request has relevance, close it. Remember that
66issues and pull requests can always be re-opened if necessary.
67
68### Author ready pull requests
69
70A pull request is _author ready_ when:
71
72* There is a CI run in progress or completed.
73* There is at least one Collaborator approval.
74* There are no outstanding review comments.
75
76Please always add the `author ready` label to the pull request in that case.
77Please always remove it again as soon as the conditions are not met anymore.
78
79### Handling own pull requests
80
81When you open a pull request, [start a CI](#testing-and-ci) right away. Later,
82after new code changes or rebasing, start a new CI.
83
84As soon as the pull request is ready to land, please do so. This allows other
85Collaborators to focus on other pull requests. If your pull request is not ready
86to land but is [author ready](#author-ready-pull-requests), add the
87`author ready` label. If you wish to land the pull request yourself, use the
88"assign yourself" link to self-assign it.
89
90## Accepting modifications
91
92Contributors propose modifications to Node.js using GitHub pull requests. This
93includes modifications proposed by TSC members and other Collaborators. A pull
94request must pass code review and CI before landing into the codebase.
95
96### Code reviews
97
98At least two Collaborators must approve a pull request before the pull request
99lands. One Collaborator approval is enough if the pull request has been open
100for more than seven days.
101
102Approving a pull request indicates that the Collaborator accepts responsibility
103for the change.
104
105Approval must be from Collaborators who are not authors of the change.
106
107In some cases, it might be necessary to summon a GitHub team to a pull request
108for review by @-mention.
109See [Who to CC in the issue tracker](#who-to-cc-in-the-issue-tracker).
110
111If you are the first Collaborator to approve a pull request that has no CI yet,
112please [start one](#testing-and-ci). Please also start a new CI if the
113pull request creator pushed new code since the last CI run.
114
115### Consensus seeking
116
117A pull request can land if it has the needed [approvals](#code-reviews),
118[CI](#testing-and-ci), [wait time](#waiting-for-approvals) and no
119[outstanding objections](#objections). [Breaking changes](#breaking-changes)
120must receive [TSC review](#involving-the-tsc) in addition to other
121requirements. If a pull request meets all requirements except the
122[wait time](#waiting-for-approvals), please add the
123[`author ready`](#author-ready-pull-requests) label.
124
125#### Objections
126
127**Collaborators can object to a pull request by using the "Request
128Changes" GitHub feature**. Dissent comments alone don't constitute an
129objection. **Any PR objection must include a clear reason for that objection,
130and the objector must remain responsive for further discussion towards
131consensus about the direction of the pull request**. Providing a set of
132actionable steps alongside the objection is recommended.
133
134If the objection is not clear to others, another collaborator can ask an
135objecting collaborator to explain their objection or to provide actionable
136steps to resolve the objection. **If the objector is unresponsive for seven
137days after a collaborator asks for clarification, another collaborator can
138dismiss the objection**.
139
140**Pull requests with outstanding objections must remain open until all
141objections are satisfied**. If reaching consensus is not possible, a
142collaborator can escalate the issue to the TSC by pinging `@nodejs/tsc` and
143adding the `tsc-agenda` label to the issue.
144
145#### Helpful resources
146
147* [How to Do Code Reviews Like a Human (Part One)](https://mtlynch.io/human-code-reviews-1/)
148* [How to Do Code Reviews Like a Human (Part Two)](https://mtlynch.io/human-code-reviews-2/)
149* [Code Review Etiquette](https://css-tricks.com/code-review-etiquette/)
150
151### Waiting for approvals
152
153Before landing pull requests, allow 48 hours for input from other Collaborators.
154Certain types of pull requests can be fast-tracked and can land after a shorter
155delay. For example:
156
157* Focused changes that affect only documentation and/or the test suite:
158  * `code-and-learn` tasks often fall into this category.
159  * `good-first-issue` pull requests might also be suitable.
160* Changes that fix regressions:
161  * Regressions that break the workflow (red CI or broken compilation).
162  * Regressions that happen right before a release, or reported soon after.
163
164To propose fast-tracking a pull request, apply the `fast-track` label. Then add
165a comment that Collaborators can upvote.
166
167If someone disagrees with the fast-tracking request, remove the label. Do not
168fast-track the pull request in that case.
169
170The pull request can be fast-tracked if two Collaborators approve the
171fast-tracking request. To land, the pull request itself still needs two
172Collaborator approvals and a passing CI.
173
174Collaborators can request fast-tracking of pull requests they did not author.
175In that case only, the request itself is also one fast-track approval. Upvote
176the comment anyway to avoid any doubt.
177
178### Testing and CI
179
180All fixes must have a test case which demonstrates the defect. The test should
181fail before the change, and pass after the change.
182
183All pull requests must pass continuous integration tests. Code changes must pass
184on [project CI server](https://ci.nodejs.org/). Pull requests that only change
185documentation and comments can use GitHub Actions results.
186
187Do not land any pull requests without a passing (green or yellow) CI run.
188For documentation-only changes, GitHub Actions CI is sufficient.
189For all other code changes, Jenkins CI must pass as well. If there are
190Jenkins CI failures unrelated to the change in the pull request, try "Resume
191Build". It is in the left navigation of the relevant `node-test-pull-request`
192job. It will preserve all the green results from the current job but re-run
193everything else. Start a fresh CI if more than seven days have elapsed since
194the original failing CI as the compiled binaries for the Windows and ARM
195platforms are only kept for seven days.
196
197#### Useful CI jobs
198
199* [`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)
200is the CI job to test pull requests. It runs the `build-ci` and `test-ci`
201targets on all supported platforms.
202
203* [`citgm-smoker`](https://ci.nodejs.org/job/citgm-smoker/)
204uses [`CitGM`](https://github.com/nodejs/citgm) to allow you to run
205`npm install && npm test` on a large selection of common modules. This is
206useful to check whether a change will cause breakage in the ecosystem.
207
208* [`node-stress-single-test`](https://ci.nodejs.org/job/node-stress-single-test/)
209can run a group of tests over and over on a specific platform. Use it to check
210that the tests are reliable.
211
212* [`node-test-commit-v8-linux`](https://ci.nodejs.org/job/node-test-commit-v8-linux/)
213runs the standard V8 tests. Run it when updating V8 in Node.js or floating new
214patches on V8.
215
216* [`node-test-commit-custom-suites-freestyle`](https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/)
217enables customization of test suites and parameters. It can execute test suites
218not used in other CI test runs (such as tests in the `internet` or `pummel`
219directories). It can also make sure tests pass when provided with a flag not
220used in other CI test runs (such as `--worker`).
221
222#### Starting a CI job
223
224From the CI Job page, click "Build with Parameters" on the left side.
225
226You generally need to enter only one or both of the following options
227in the form:
228
229* `GIT_REMOTE_REF`: Change to the remote portion of git refspec.
230To specify the branch this way, `refs/heads/BRANCH` is used
231(e.g. for `master` -> `refs/heads/master`).
232For pull requests, it will look like `refs/pull/PR_NUMBER/head`
233(e.g. for PR#42 -> `refs/pull/42/head`).
234* `REBASE_ONTO`: Change that to `origin/master` so the pull request gets rebased
235onto master. This can especially be important for pull requests that have been
236open a while.
237
238Look at the list of jobs on the left hand side under "Build History" and copy
239the link to the one you started (which will be the one on top, but click
240through to make sure it says something like "Started 5 seconds ago"
241(top right) and "Started by user ...".
242
243Copy/paste the URL for the job into a comment in the pull request.
244[`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)
245is an exception where the GitHub bot will automatically post for you.
246
247### Internal vs. public API
248
249All functionality in the official Node.js documentation is part of the public
250API. Any undocumented object, property, method, argument, behavior, or event is
251internal. There are exceptions to this rule. Node.js users have come to rely on
252some undocumented behaviors. Collaborators treat many of those undocumented
253behaviors as public.
254
255All undocumented functionality exposed via  `process.binding(...)` is internal.
256
257All undocumented functionality in `lib/internal/**/*.js` is internal. It is
258public, though, if it is re-exported by code in `lib/*.js`.
259
260Non-exported `Symbol` properties and methods are internal.
261
262Any undocumented object property or method that begins with `_` is internal.
263
264Any native C/C++ APIs/ABIs requiring the `NODE_WANT_INTERNALS` flag are
265internal.
266
267Sometimes, there is disagreement about whether functionality is internal or
268public. In those cases, the TSC makes a determination.
269
270For undocumented APIs that are public, open a pull request documenting the API.
271
272### Breaking changes
273
274At least two TSC members must approve backward-incompatible changes to the
275master branch.
276
277Examples of breaking changes include:
278
279* Removal or redefinition of existing API arguments.
280* Changing return values.
281* Removing or modifying existing properties on an options argument.
282* Adding or removing errors.
283* Altering expected timing of an event.
284* Changing the side effects of using a particular API.
285
286#### Breaking changes and deprecations
287
288Existing stable public APIs that change in a backward-incompatible way must
289undergo deprecation. The exceptions to this rule are:
290
291* Adding or removing errors thrown or reported by a public API.
292* Changing error messages for errors without error code.
293* Altering the timing and non-internal side effects of the public API.
294* Changes to errors thrown by dependencies of Node.js, such as V8.
295* One-time exceptions granted by the TSC.
296
297For more information, see [Deprecations](#deprecations).
298
299#### Breaking changes to internal elements
300
301Breaking changes to internal elements can occur in semver-patch or semver-minor
302commits. Take significant care when making and reviewing such changes. Make
303an effort to determine the potential impact of the change in the ecosystem. Use
304[Canary in the Goldmine](https://github.com/nodejs/citgm) to test such changes.
305If a change will cause ecosystem breakage, then it is semver-major. Consider
306providing a Public API in such cases.
307
308#### Unintended breaking changes
309
310Sometimes, a change intended to be non-breaking turns out to be a breaking
311change. If such a change lands on the master branch, a Collaborator can revert
312it. As an alternative to reverting, the TSC can apply the semver-major label
313after-the-fact.
314
315##### Reverting commits
316
317Revert commits with `git revert <HASH>` or `git revert <FROM>..<TO>`. The
318generated commit message will not have a subsystem and might violate line length
319rules. That is OK. Append the reason for the revert and any `Refs` or `Fixes`
320metadata. Raise a pull request like any other change.
321
322### Introducing new modules
323
324Treat commits that introduce new core modules with extra care.
325
326Check if the module's name conflicts with an existing ecosystem module. If it
327does, choose a different name unless the module owner has agreed in writing to
328transfer it.
329
330If the new module name is free, register a placeholder in the module registry as
331soon as possible. Link to the pull request that introduces the new core module
332in the placeholder's `README`.
333
334For pull requests introducing new core modules:
335
336* Allow at least one week for review.
337* Land only after sign-off from at least two TSC members.
338* Land with a [Stability Index][] of Experimental. The module must remain
339  Experimental until a semver-major release.
340
341### Additions to N-API
342
343N-API provides an ABI-stable API guaranteed for future Node.js versions. N-API
344additions call for unusual care and scrutiny. If a change adds to `node_api.h`,
345`js_native_api.h`, `node_api_types.h`, or `js_native_api_types.h`, consult [the relevant
346guide](https://github.com/nodejs/node/blob/master/doc/guides/adding-new-napi-api.md).
347
348### Deprecations
349
350Node.js uses three [Deprecation][] levels. For all deprecated APIs, the API
351documentation must state the deprecation status.
352
353* Documentation-Only Deprecation
354  * A deprecation notice appears in the API documentation.
355  * There are no functional changes.
356  * By default, there will be no warnings emitted for such deprecations at
357    runtime.
358  * Might cause a runtime warning with the [`--pending-deprecation`][] flag or
359    `NODE_PENDING_DEPRECATION` environment variable.
360
361* Runtime Deprecation
362  * Emits a warning at runtime on first use of the deprecated API.
363  * If used with the [`--throw-deprecation`][] flag, will throw a runtime error.
364
365* End-of-Life
366  * The API is no longer subject to the semantic versioning rules.
367  * Backward-incompatible changes including complete removal of such APIs can
368    occur at any time.
369
370Apply the `notable change` label to all pull requests that introduce
371Documentation-Only Deprecations. Such deprecations have no impact on code
372execution. Thus, they are not breaking changes (`semver-major`).
373
374Runtime Deprecations and End-of-Life APIs (internal or public) are breaking
375changes (`semver-major`). The TSC can make exceptions, deciding that one of
376these deprecations is not a breaking change.
377
378Avoid Runtime Deprecations when an alias or a stub/no-op will suffice. An alias
379or stub will have lower maintenance costs for end users and Node.js core.
380
381All deprecations receive a unique and immutable identifier. Documentation,
382warnings, and errors use the identifier when referring to the deprecation. The
383documentation for the deprecation identifier must always remain in the API
384documentation. This is true even if the deprecation is no longer in use (for
385example, due to removal of an End-of-Life deprecated API).
386
387<a id="deprecation-cycle"></a>
388A _deprecation cycle_ is a major release during which an API has been in one of
389the three Deprecation levels. Documentation-Only Deprecations can land in a
390minor release. They can not change to a Runtime Deprecation until the next major
391release.
392
393No API can change to End-of-Life without going through a Runtime Deprecation
394cycle. There is no rule that deprecated code must progress to End-of-Life.
395Documentation-Only and Runtime Deprecations can remain in place for an unlimited
396duration.
397
398Communicate pending deprecations and associated mitigations with the ecosystem
399as soon as possible. If possible, do it before the pull request adding the
400deprecation lands on the master branch.
401
402Use the `notable-change` label on pull requests that add or change the
403deprecation level of an API.
404
405### Involving the TSC
406
407Collaborators can opt to elevate pull requests or issues to the [TSC][].
408Do this if a pull request or issue:
409
410* Is labeled `semver-major`, or
411* Has a significant impact on the codebase, or
412* Is controversial, or
413* Is at an impasse among Collaborators who are participating in the discussion.
414
415@-mention the `@nodejs/tsc` GitHub team if you want to elevate an issue to the
416[TSC][]. Do not use the GitHub UI on the right-hand side to assign to
417`@nodejs/tsc` or request a review from `@nodejs/tsc`.
418
419The TSC serves as the final arbiter where required.
420
421## Landing pull requests
422
4231. Avoid landing pull requests that have someone else as an assignee. Authors
424   who wish to land their own pull requests will self-assign them. Sometimes, an
425   author will delegate to someone else. If in doubt, ask the assignee whether
426   it is okay to land.
4271. Never use GitHub's green ["Merge Pull Request"][] button. Reasons for not
428   using the web interface button:
429   * The "Create a merge commit" method will add an unnecessary merge commit.
430   * The "Squash and merge" method will add metadata (the pull request #) to the
431     commit title. If more than one author contributes to the pull request,
432     squashing only keeps one author.
433   * The "Rebase and merge" method has no way of adding metadata to the commit.
4341. Make sure CI is complete and green. If the CI is not green, check for
435   unreliable tests and infrastructure failures. If there are not corresponding
436   issues in the [node][unreliable tests] or
437   [build](https://github.com/nodejs/build/issues) repositories, open new
438   issues. Run a new CI any time someone pushes new code to the pull request.
4391. Check that the commit message adheres to [commit message guidelines][].
4401. Add all necessary [metadata](#metadata) to commit messages before landing. If
441   you are unsure exactly how to format the commit messages, use the commit log
442   as a reference. See [this commit][commit-example] as an example.
443
444For pull requests from first-time contributors, be
445[welcoming](#welcoming-first-time-contributors). Also, verify that their git
446settings are to their liking.
447
448All commits should be self-contained, meaning every commit should pass all
449tests. This makes it much easier when bisecting to find a breaking change.
450
451### Using `git-node`
452
453In most cases, using [the `git-node` command][git-node] of [`node-core-utils`][]
454is enough to land a pull request. If you discover a problem when using
455this tool, please file an issue [to the issue tracker][node-core-utils-issues].
456
457Quick example:
458
459```text
460$ npm install -g node-core-utils
461$ git node land $PRID
462```
463
464To use `node-core-utils`, you will need a GitHub access token. If you do not
465have one, `node-core-utils` will create one for you the first time you use it.
466To do this, it will ask for your GitHub password and two-factor authentication
467code. If you wish to create the token yourself in advance, see
468[the `node-core-utils` guide][node-core-utils-credentials].
469
470### Technical HOWTO
471
472Infrequently, it is necessary to manually perform the steps required to land a
473pull request rather than rely on `git-node`.
474
475<details>
476<Summary>Manual Landing Steps</Summary>
477
478Clear any `am`/`rebase` that might already be underway:
479
480```text
481$ git am --abort
482$ git rebase --abort
483```
484
485Checkout proper target branch:
486
487```text
488$ git checkout master
489```
490
491Update the tree (assumes your repo is set up as detailed in
492[CONTRIBUTING.md](./contributing/pull-requests.md#step-1-fork)):
493
494```text
495$ git fetch upstream
496$ git merge --ff-only upstream/master
497```
498
499Apply external patches:
500
501```text
502$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am --whitespace=fix
503```
504
505If the merge fails even though recent CI runs were successful, try a 3-way
506merge:
507
508```text
509$ git am --abort
510$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am -3 --whitespace=fix
511```
512
513If the 3-way merge succeeds, check the results against the original pull
514request. Build and test on at least one platform before landing.
515
516If the 3-way merge fails, then it is most likely that a conflicting pull request
517has landed since the CI run. You will have to ask the author to rebase.
518
519Check and re-review the changes:
520
521```text
522$ git diff upstream/master
523```
524
525Check the number of commits and commit messages:
526
527```text
528$ git log upstream/master...master
529```
530
531Squash commits and add metadata:
532
533```text
534$ git rebase -i upstream/master
535```
536
537This will open a screen like this (in the default shell editor):
538
539```text
540pick 6928fc1 crypto: add feature A
541pick 8120c4c add test for feature A
542pick 51759dc crypto: feature B
543pick 7d6f433 test for feature B
544
545# Rebase f9456a2..7d6f433 onto f9456a2
546#
547# Commands:
548#  p, pick = use commit
549#  r, reword = use commit, but edit the commit message
550#  e, edit = use commit, but stop for amending
551#  s, squash = use commit, but meld into previous commit
552#  f, fixup = like "squash", but discard this commit's log message
553#  x, exec = run command (the rest of the line) using shell
554#
555# These lines can be re-ordered; they are executed from top to bottom.
556#
557# If you remove a line here THAT COMMIT WILL BE LOST.
558#
559# However, if you remove everything, the rebase will be aborted.
560#
561# Note that empty commits are commented out
562```
563
564Replace a couple of `pick`s with `fixup` to squash them into a
565previous commit:
566
567```text
568pick 6928fc1 crypto: add feature A
569fixup 8120c4c add test for feature A
570pick 51759dc crypto: feature B
571fixup 7d6f433 test for feature B
572```
573
574Replace `pick` with `reword` to change the commit message:
575
576```text
577reword 6928fc1 crypto: add feature A
578fixup 8120c4c add test for feature A
579reword 51759dc crypto: feature B
580fixup 7d6f433 test for feature B
581```
582
583Save the file and close the editor. When prompted, enter a new commit message
584for that commit. This is an opportunity to fix commit messages.
585
586* The commit message text must conform to the [commit message guidelines][].
587* <a name="metadata"></a>Change the original commit message to include metadata. (The
588  [`git node metadata`][git-node-metadata] command can generate the metadata
589  for you).
590
591  * Required: A `PR-URL:` line that references the full GitHub URL of the pull
592    request. This makes it easy to trace a commit back to the conversation that
593    led up to that change.
594  * Optional: A `Fixes: X` line, where _X_ is the full GitHub URL for an
595    issue. A commit message can include more than one `Fixes:` lines.
596  * Optional: One or more `Refs:` lines referencing a URL for any relevant
597    background.
598  * Required: A `Reviewed-By: Name <email>` line for each Collaborator who
599    reviewed the change.
600    * Useful for @mentions / contact list if something goes wrong in the
601      pull request.
602    * Protects against the assumption that GitHub will be around forever.
603
604Other changes might have landed on master since the successful CI run. As a
605precaution, run tests (`make -j4 test` or `vcbuild test`).
606
607Confirm that the commit message format is correct using
608[core-validate-commit](https://github.com/evanlucas/core-validate-commit).
609
610```text
611$ git rev-list upstream/master...HEAD | xargs core-validate-commit
612```
613
614Optional: For your own commits, force push the amended commit to the pull
615request branch. If your branch name is `bugfix`, then: `git push
616--force-with-lease origin master:bugfix`. Don't close the pull request.
617It will close after you push it upstream. It will have the purple merged
618status rather than the red closed status. If you close the pull request
619before GitHub adjusts its status, it will show up as a 0 commit pull
620request with no changed files. The order of operations is important.
621If you push upstream before you push to your branch, GitHub will close
622the issue with the red closed status.
623
624Time to push it:
625
626```text
627$ git push upstream master
628```
629
630Close the pull request with a "Landed in `<commit hash>`" comment. Even if
631your pull request shows the purple merged status,
632add the "Landed in \<commit hash>..\<commit hash>" comment if you added
633more than one commit.
634
635</details>
636
637### Troubleshooting
638
639Sometimes, when running `git push upstream master`, you might get an error
640message like this:
641
642```console
643To https://github.com/nodejs/node
644 ! [rejected]              master -> master (fetch first)
645error: failed to push some refs to 'https://github.com/nodejs/node'
646hint: Updates were rejected because the tip of your current branch is behind
647hint: its remote counterpart. Integrate the remote changes (e.g.
648hint: 'git pull ...') before pushing again.
649hint: See the 'Note about fast-forwards' in 'git push --help' for details.
650```
651
652That means a commit has landed since your last rebase against `upstream/master`.
653To fix this, pull with rebase from upstream, run the tests again, and (if the
654tests pass) push again:
655
656```bash
657git pull upstream master --rebase
658make -j4 test
659git push upstream master
660```
661
662### I made a mistake
663
664* Ping a TSC member.
665* `#node-dev` on freenode.
666* With `git`, there's a way to override remote trees by force pushing
667  (`git push -f`). This is generally forbidden as it creates conflicts in other
668  people's forks. It is permissible for simpler slip-ups such as typos in commit
669  messages. You are only allowed to force push to any Node.js branch within 10
670  minutes from your original push. If someone else pushes to the branch or the
671  10-minute period passes, consider the commit final.
672  * Use `--force-with-lease` to reduce the chance of overwriting someone else's
673    change.
674  * Post to `#node-dev` (IRC) if you force push.
675
676### Long term support
677
678#### What is LTS?
679
680Long Term Support (LTS) guarantees 30-month support cycles for specific Node.js
681versions. You can find more information
682[in the full release plan](https://github.com/nodejs/Release#release-plan). Once
683a branch enters LTS, the release plan limits the types of changes permitted in
684the branch.
685
686#### How are LTS branches managed?
687
688Each LTS release has a corresponding branch (v10.x, v8.x, etc.). Each also has a
689corresponding staging branch (v10.x-staging, v8.x-staging, etc.).
690
691Commits that land on master are cherry-picked to each staging branch as
692appropriate. If a change applies only to the LTS branch, open the PR against the
693*staging* branch. Commits from the staging branch land on the LTS branch only
694when a release is being prepared. They can land on the LTS branch in a different
695order than they were in staging.
696
697Only members of @nodejs/backporters should land commits onto LTS staging
698branches.
699
700#### How can I help?
701
702When you send your pull request, please state if your change is breaking. Also
703state if you think your patch is a good candidate for backporting. For more
704information on backporting, please see the [backporting guide][].
705
706There are several LTS-related labels:
707
708* `lts-watch-` labels are for pull requests to consider for landing in staging
709  branches. For example, `lts-watch-v10.x` would be for a change
710  to consider for the `v10.x-staging` branch.
711
712* `land-on-` are for pull requests that should land in a future v*.x
713  release. For example, `land-on-v10.x` would be for a change to land in Node.js
714  10.x.
715
716Any Collaborator can attach these labels to any pull request/issue. As commits
717land on the staging branches, the backporter removes the `lts-watch-` label.
718Likewise, as commits land in an LTS release, the releaser removes the `land-on-`
719label.
720
721Attach the appropriate `lts-watch-` label to any pull request that
722might impact an LTS release.
723
724## Who to CC in the issue tracker
725
726| Subsystem                                | Maintainers                                                           |
727| ---                                      | ---                                                                   |
728| `benchmark/*`                            | @nodejs/benchmarking, @mscdex                                         |
729| `doc/*`, `*.md`                          | @nodejs/documentation                                                 |
730| `lib/assert`                             | @nodejs/assert                                                        |
731| `lib/async_hooks`                        | @nodejs/async\_hooks for bugs/reviews (+ @nodejs/diagnostics for API) |
732| `lib/buffer`                             | @nodejs/buffer                                                        |
733| `lib/child_process`                      | @nodejs/child\_process                                                |
734| `lib/cluster`                            | @nodejs/cluster                                                       |
735| `lib/{crypto,tls,https}`                 | @nodejs/crypto                                                        |
736| `lib/dgram`                              | @nodejs/dgram                                                         |
737| `lib/domains`                            | @nodejs/domains                                                       |
738| `lib/fs`, `src/{fs,file}`                | @nodejs/fs                                                            |
739| `lib/{_}http{*}`                         | @nodejs/http                                                          |
740| `lib/inspector.js`, `src/inspector_*`    | @nodejs/v8-inspector                                                  |
741| `lib/internal/bootstrap/*`               | @nodejs/process                                                       |
742| `lib/internal/url`, `src/node_url`       | @nodejs/url                                                           |
743| `lib/net`                                | @bnoordhuis, @indutny, @nodejs/streams                                |
744| `lib/repl`                               | @nodejs/repl                                                          |
745| `lib/{_}stream{*}`                       | @nodejs/streams                                                       |
746| `lib/timers`                             | @nodejs/timers                                                        |
747| `lib/util`                               | @nodejs/util                                                          |
748| `lib/zlib`                               | @nodejs/zlib                                                          |
749| `src/async_wrap.*`                       | @nodejs/async\_hooks                                                  |
750| `src/node_api.*`                         | @nodejs/n-api                                                         |
751| `src/node_crypto.*`                      | @nodejs/crypto                                                        |
752| `test/*`                                 | @nodejs/testing                                                       |
753| `tools/node_modules/eslint`, `.eslintrc` | @nodejs/linting                                                       |
754| build                                    | @nodejs/build                                                         |
755| `src/module_wrap.*`, `lib/internal/modules/*`, `lib/internal/vm/module.js` | @nodejs/modules                     |
756| GYP                                      | @nodejs/gyp                                                           |
757| performance                              | @nodejs/performance                                                   |
758| platform specific                        | @nodejs/platform-{aix,arm,freebsd,macos,ppc,smartos,s390,windows}     |
759| python code                              | @nodejs/python                                                        |
760| upgrading c-ares                         | @rvagg                                                                |
761| upgrading http-parser                    | @nodejs/http, @nodejs/http2                                           |
762| upgrading libuv                          | @nodejs/libuv                                                         |
763| upgrading npm                            | @nodejs/npm                                                           |
764| upgrading V8                             | @nodejs/V8, @nodejs/post-mortem                                       |
765| Embedded use or delivery of Node.js      | @nodejs/delivery-channels                                             |
766
767When things need extra attention, are controversial, or `semver-major`:
768@nodejs/tsc
769
770If you cannot find who to cc for a file, `git shortlog -n -s <file>` can help.
771
772["Merge Pull Request"]: https://help.github.com/articles/merging-a-pull-request/#merging-a-pull-request-on-github
773[Deprecation]: https://en.wikipedia.org/wiki/Deprecation
774[Stability Index]: ../api/documentation.md#stability-index
775[TSC]: https://github.com/nodejs/TSC
776[`--pending-deprecation`]: ../api/cli.md#--pending-deprecation
777[`--throw-deprecation`]: ../api/cli.md#--throw-deprecation
778[`node-core-utils`]: https://github.com/nodejs/node-core-utils
779[backporting guide]: backporting-to-release-lines.md
780[commit message guidelines]: contributing/pull-requests.md#commit-message-guidelines
781[commit-example]: https://github.com/nodejs/node/commit/b636ba8186
782[git-email]: https://help.github.com/articles/setting-your-commit-email-address-in-git/
783[git-node]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md
784[git-node-metadata]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-metadata
785[git-username]: https://help.github.com/articles/setting-your-username-in-git/
786[node-core-utils-credentials]: https://github.com/nodejs/node-core-utils#setting-up-credentials
787[node-core-utils-issues]: https://github.com/nodejs/node-core-utils/issues
788[unreliable tests]: https://github.com/nodejs/node/issues?q=is%3Aopen+is%3Aissue+label%3A%22CI+%2F+flaky+test%22
789