Skip to content

Editing pull request: Can we rebase instead of merge? #215

Description

@Mariatta

Regarding this section:

In step 3, is it possible to do rebase instead of merge?

When we do git merge, we could be getting a whole bunch of unrelated changes in the PR.

Activity

  1. methane commented on May 31, 2017

    @methane
    Member

    -1 from me.
    rebase rewrites history.
    If we push rewritten history to contributor's branch and the contributor has local change,
    the contributor may be surprised when they do git pull.

    Since we use "squash and merge" button when merging pull request,
    there are no reason to use rebase.

  2. ncoghlan commented on May 31, 2017

    @ncoghlan
    Contributor

    It's possible to skip the merge entirely - that's just the example we used of a change someone might want to make.

    It's probably better to simplify the example to:

    $ git add <changes>
    $ git commit -m "<commit message>"
    

    And then add a separate note saying to only use git merge rather than git rebase if you need to bring in changes from the PR's target branch (for the reason @methane describes - we don't want to rewrite the contributor's branch history).

  3. serhiy-storchaka commented on May 31, 2017

    @serhiy-storchaka
    Member

    I concur with @methane.

    It's possible to skip the merge entirely - that's just the example we used of a change someone might want to make.

    Unfortunately AppVeyor build failed if it can't merge the branch to master without conflicts (which are likely if Misc/NEWS is changed).

  4. Mariatta commented on May 31, 2017

    @Mariatta
    MemberAuthor

    My concern is that when a PR was created quite a long while ago, when we do a merge from a more recent origin\master, it can bring in too many unrelated changes, making it difficult to review perhaps.
    But I agree with the point about not wanting to rewrite the contributor's branch history.
    I'll leave the instruction as is for now.
    Thanks :)

  5. ncoghlan commented on Jun 2, 2017

    @ncoghlan
    Contributor

    @Mariatta For those cases, it may make sense to ask the contributor if they'd mind doing a rebase before doing a merge ourselves and/or asking them if they're OK with us doing one.

    The main problem we want to avoid is doing a rebase without the contributor being aware it's happening.

  6. methane commented on Jun 2, 2017

    @methane
    Member

    when a PR was created quite a long while ago, when we do a merge from a more recent origin\master, it can bring in too many unrelated changes, making it difficult to review perhaps.

    I think Github won't show commits from master branch.
    Github will show only one "merge commit".

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions