Wireshark-dev: Re: [Wireshark-dev] Struggling to rebase
From: Jano Svitok <jan.svitok@xxxxxxxxx>
Date: Fri, 5 Mar 2021 11:44:28 +0100
if you want to push your rebased changes, do "git push downstream --force-with-lease"

Jano

On Fri, Mar 5, 2021 at 11:22 AM Paul Offord <paul.offord58@xxxxxxxxx> wrote:
Hi,

I'm working on updates to sharkd.  I have pushed the changes to my downstream repo on gitlab.  The tests run fine but the Merge request shows:

Fast-forward merge is not possible. To merge this request, first rebase locally.

I made sure my local master was up to date with a git pull.  I then did:

git rebase master issue17235

issue17235 being my feature branch.  This gave me merge conflicts.  All of those conflicts related to changes to earlier versions of the same branch that I had pushed to downstream.

I'm now stuck in a bit of a loop:
  • I resolve the merge conflicts
  • I get a clean commit
  • I do:  git push downstream HEAD
  • That fails with:
    • To gitlab.com:credible58/wireshark.git
    •  ! [rejected]              HEAD -> issue17235 (non-fast-forward)
    • error: failed to push some refs to 'gitlab.com:credible58/wireshark.git'
    • hint: Updates were rejected because the tip of your current branch is behind
    • hint: its remote counterpart. Integrate the remote changes (e.g.
    • hint: 'git pull ...') before pushing again.
    • hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  • I do the git pull as suggested
  • I have the same merge conflicts as I started with
I'm thinking of deleting my branch, abandoning the Merge Request and starting over.

Is that a bad idea?
Is there a simpler solution?

Thanks and regards...Paul

--

Paul Offord

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe