From: Phillip Wood <phillip.wood123@gmail•com>
To: Kartik Agaram <ak@akkartik•com>, git@vger•kernel.org
Subject: Re: bug: `git pull --rebase` breaks in the presence of pushurls
Date: Mon, 8 Dec 2025 14:30:44 +0000 [thread overview]
Message-ID: <04cc0cc0-155e-422e-b723-b1115c918087@gmail.com> (raw)
In-Reply-To: <896e4e13-5d2f-4c5c-ac32-2927dbff91a0@app.fastmail.com>
Hi Kartik
On 07/12/2025 21:55, Kartik Agaram wrote:
Thanks for the easy reproducer
> 7. Create commit 3 in working directory A and try unsuccessfully to push it.
>
> cd ../A
> echo c > c
> git add .
> git commit -m 'commit 3'
> git push> > This throws an error when pushing to hub, but successfully pushes to
mirror.
"git push" updates refs/remotes/origin/master when pushing to "mirror".
> 8. Try to fix the problem:
>
> git pull --rebase
"git pull" tries to find the fork point between origin/master and master
which is the tip of master because "git push" just updated origin/master
to point to the same commit as master.
Unfortunately I'm not sure there is an easy way to fix this. For now I'd
recommend doing
git fetch && git rebase --no-fork-point
instead of running "git pull --rebase". We should perhaps add a
"--no-fork-point" option to "git pull" as this isn't the first time that
the fork-point has caused problems [1]. There was a patch to do that at
[2] but it was lacking tests.
Thanks
Phillip
[1]
https://lore.kernel.org/git/6bebcee9-1315-4ec3-a49b-d767f0f67bf7@gmail.com/
[2]
https://lore.kernel.org/git/06beff46-cdaf-91c8-e6a3-6557694af618@gmail.com/
next prev parent reply other threads:[~2025-12-08 14:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-07 21:55 bug: `git pull --rebase` breaks in the presence of pushurls Kartik Agaram
2025-12-08 14:30 ` Phillip Wood [this message]
2025-12-08 16:04 ` Phillip Wood
2025-12-08 16:43 ` Kartik Agaram
2025-12-08 22:24 ` Junio C Hamano
2025-12-09 1:48 ` Kartik Agaram
2025-12-09 16:03 ` Phillip Wood
2025-12-10 14:25 ` Phillip Wood
2025-12-11 3:21 ` Junio C Hamano
2025-12-11 5:35 ` K Jayatheerth
2025-12-11 15:54 ` Phillip Wood
2025-12-11 19:39 ` Phillip Wood
2025-12-11 15:56 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04cc0cc0-155e-422e-b723-b1115c918087@gmail.com \
--to=phillip.wood123@gmail$(echo .)com \
--cc=ak@akkartik$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=phillip.wood@dunelm$(echo .)org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox