Wireshark-dev: Re: [Wireshark-dev] Struggling to rebase
From: Paul Offord <paul.offord58@xxxxxxxxx>
Date: Fri, 5 Mar 2021 18:19:51 +0000
Thank very much Jano. I'll give that a try.
On Fri, Mar 5, 2021 at 11:52 AM Jano Svitok <jan.svitok@xxxxxxxxx> wrote:
I've a deeper look at your repo.I suppose upstream remote is main wireshark repo, downstream is your own fork.1. your downstream master is no aligned with upstream. if it is not intentional, you may start with fixing that.if it is indeed intentional, you may consider keeping your changes in a different-named branch and continue with the recipe :)1.1 add remote to your local git repo (on your harddisk):git remote add upstream https://gitlab.com/wireshark/wireshark.git1.2 get sources from upstream:git fetch --all1.3 align local master with downstream master:git pull --rebase downstream master if you have master checked outorgit fetch downstream master:master if you have another branch checked out1.4 now align upstream and downstream1.4.1 if you have checked out master1.4.1.1 and master is clean:git pull --rebase upstream mastergit push downstream master1.4.1.2 in your case, the first step fails, because your downstream master has some differences to upstream and they cause conflicts.1.4.1.2.1 you can either forget them, and set your downstream master to upstream:git reset --hard upstream/mastergit push downstream --force1.4.1.2.2 or store the differences somewhere1.4.1.2.3 or use another branch to track upstream/master1.4.2 if you have checked out another branch (e.g. issuexxxx):1.4.2.1 if downstream/master is clean:git fetch upstream master:mastergit push downstream master1.4.2.1 if downstream/master has additional stuff (will be lost):git fetch upstream master:master --forcegit push downstream master --force2. now do rebase on your local master:I see there some merge commits, it would be good if they somehow get lost along the way :)git checkout issue17235git rebase mastergit push downstream --force-with-leaseJano___________________________________________________________________________On Fri, Mar 5, 2021 at 11:44 AM Jano Svitok <jan.svitok@xxxxxxxxx> wrote:if you want to push your rebased changes, do "git push downstream --force-with-lease"JanoOn 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 issue17235issue17235 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
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
Paul Offord
- Follow-Ups:
- Re: [Wireshark-dev] Struggling to rebase
- From: chuck c
- Re: [Wireshark-dev] Struggling to rebase
- References:
- [Wireshark-dev] Struggling to rebase
- From: Paul Offord
- Re: [Wireshark-dev] Struggling to rebase
- From: Jano Svitok
- Re: [Wireshark-dev] Struggling to rebase
- From: Jano Svitok
- [Wireshark-dev] Struggling to rebase
- Prev by Date: Re: [Wireshark-dev] Struggling to rebase
- Next by Date: Re: [Wireshark-dev] Struggling to rebase
- Previous by thread: Re: [Wireshark-dev] Struggling to rebase
- Next by thread: Re: [Wireshark-dev] Struggling to rebase
- Index(es):