summaryrefslogtreecommitdiff
path: root/COLLABORATOR_GUIDE.md
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-08-15 21:30:38 -0700
committerRich Trott <rtrott@gmail.com>2017-08-17 21:41:28 -0700
commitd15a5c0fe1380bc33368d08f3cf4564a60146243 (patch)
treef0ced752801c5448a79c18a03e4e9b804b23730c /COLLABORATOR_GUIDE.md
parent0c5ea126dccaa431b8ebe26a690dc1447369c72d (diff)
downloadandroid-node-v8-d15a5c0fe1380bc33368d08f3cf4564a60146243.tar.gz
android-node-v8-d15a5c0fe1380bc33368d08f3cf4564a60146243.tar.bz2
android-node-v8-d15a5c0fe1380bc33368d08f3cf4564a60146243.zip
doc: explain what to do if git push is rejected
In COLLABORATOR_GUIDE.md, explain what to do if `git push upstream master` is rejected. PR-URL: https://github.com/nodejs/node/pull/14848 Fixes: https://github.com/nodejs/node/issues/12628 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'COLLABORATOR_GUIDE.md')
-rw-r--r--COLLABORATOR_GUIDE.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md
index 116624a79a..bb012ba90e 100644
--- a/COLLABORATOR_GUIDE.md
+++ b/COLLABORATOR_GUIDE.md
@@ -512,6 +512,33 @@ your pull request shows the purple merged status then you should still
add the "Landed in <commit hash>..<commit hash>" comment if you added
multiple commits.
+### Troubleshooting
+
+Sometimes, when running `git push upstream master`, you may get an error message
+like this:
+
+```console
+To https://github.com/nodejs/node
+ ! [rejected] master -> master (fetch first)
+error: failed to push some refs to 'https://github.com/nodejs/node'
+hint: Updates were rejected because the remote contains work that you do
+hint: not have locally. This is usually caused by another repository pushing
+hint: to the same ref. You may want to first integrate the remote changes
+hint: (e.g., 'git pull ...') before pushing again.
+hint: See the 'Note about fast-forwards' in 'git push --help' for details.
+```
+
+That means a commit has landed since your last rebase against `upstream/master`.
+To fix this, fetch, rebase, run the tests again (to make sure no interactions
+between your changes and the new changes cause any problems), and push again:
+
+```sh
+git fetch upstream
+git rebase upstream/master
+make -j4 test
+git push upstream master
+```
+
### I Just Made a Mistake
* Ping a CTC member.