镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

doc, meta: document what to do if git push upstream master is rejected #12628

Closed

Description

@vsemozhetbyt
  • Subsystem: doc, meta

Trying to land a big PR after syncing the masters, while other collaborators actively pushed the same time, I've got this:

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.

Maybe it is worth to be documented in the COLLABORATOR_GUIDE.md#technical-howto what to do in this case.

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    metaIssues and PRs related to the general management of the project.
    on Apr 24, 2017
  2. Fishrock123 commented on Apr 24, 2017

    @Fishrock123
    Contributor

    Briefly, my usual workflow would be:

    git checkout -b tmp
    git checkout master
    git remote update -p
    git merge --ff-only upstream/master
    git checkout tmp
    git rebase master
    
    <after rebase>
    
    git checkout master
    git merge --ff-only tmp
    
  3. Fishrock123 commented on Apr 24, 2017

    @Fishrock123
    Contributor

    Although if I was merging someone else's pr without conflicts, I'd just git am the patch again after rebasing master. Typically much easier.

  4. gibfahn commented on Apr 24, 2017

    @gibfahn
    Member

    I'd just do:

    git fetch --all
    git rebase
    git push
  5. Trott commented on Aug 16, 2017

    @Trott
    Member

    PR: #14848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.metaIssues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions