Skip to content

Rebasing Staging with master results in a push/pull indicator #3254

Closed

Description

@nomanAdfenix

rebaseissue

Description

I have rebased my staging branch with master and after merging the code from master to staging I am facing Pull/Push Origin requests seen in the attached photo.

Version

GitHub Desktop version: [1.0.7]

OS version: [windows 10]

Steps to Reproduce

  1. Rebase branch Staging onto master
  2. merge master into staging
  3. pull/push staging
  4. checkout master
    5.you will see push/pull origin request

Expected behavior: No push/pull should be seen

Actual behavior: looking at the push/pull indicators

Reproduces how often: every time I do the rebase

Logs

Additional Information

Activity

  1. shiftkey commented on Nov 7, 2017

    @shiftkey
    Member

    @nomanAdfenix could you open the repository in a shell at the point where you see this count, run these two commands and attach the output?

    $ git rev-list --left-right --count master..origin/master
    $ git status
    

    It's hard to say what exactly is happening here, but let's see what Git is reporting about your master branch and we can go from there...

  2. added
    more-info-needed
    on Nov 7, 2017
  3. shiftkey commented on Nov 7, 2017

    @shiftkey
    Member

    I have rebased my staging branch with master and after merging the code from master to staging I am facing Pull/Push Origin requests seen in the attached photo.

    Could you also include the commands you ran here, so it's clear how you're rebasing branches to end up in this state?

  4. nomanAdfenix commented on Nov 8, 2017

    @nomanAdfenix
    Author
  5. nomanAdfenix commented on Nov 9, 2017

    @nomanAdfenix
    Author

    snapshot1
    snapshot2
    snapshot3

    I am attaching the snapShots in order from 1-3. I hope it would help to figure out.

  6. shiftkey commented on Nov 9, 2017

    @shiftkey
    Member

    @nomanAdfenix I think the issue is this step:

    $ git rebase Staging
    

    This takes the current ref you are on (in this case, master) and rebases it on top of Staging, using the common ancestor commit for both refs as the base.

    I was able to reproduce this by running a similar command against the desktop repo (after resolving many conflicts):

    $ git checkout master
    $ git rebase encodings-as-a-first-class-thing
    ...
    $ git status
    On branch master
    Your branch and 'origin/master' have diverged,
    and have 502 and 589 different commits each, respectively.
      (use "git pull" to merge the remote branch into yours)
    
    nothing to commit, working tree clean
    

    I believe Desktop is reporting the right numbers here for the branch, because rebasing master will rewrite the OIDs for commits which were already pushed, and Git will consider them distinct.

    Whenever I'm doing rebasing I usually include both refs, to avoid this sort of confusion:

    $ git rebase master Staging
    

    This will rebase Staging on top of master, which may have been what you intended to do.

  7. removed
    more-info-needed
    on Nov 9, 2017
  8. nomanAdfenix commented on Nov 10, 2017

    @nomanAdfenix
    Author
  9. locked as resolved and limited conversation to collaborators on Jul 19, 2018
  10. unlocked this conversation on Sep 27, 2018
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions