git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Difficulties using git rebase. Help, please!

From
Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Date
Jan 11, 2026, 16:29 UTC
Message-ID
<CALE2CrQ0nrO-=ROk_gDQgnnEJzW2NhQJMy4r_NkgBjtRaUUZMg@mail.gmail.com>
In-Reply-To
<aWPH9gY9VA6vW-gc@MAC.fritz.box>
Hi Alan,

What you are seeing is consistent with Git believing that your branch contains about 2012 commits on top of origin/linux-6.13.y. That does not mean you personally wrote 2012 commits. It means your branch is based on a moving remote branch instead of on a fixed base commit.

When you run:
    git rebase --onto master origin/linux-6.13.y HEAD

Git takes everything that is reachable from HEAD but not reachable from origin/linux-6.13.y and tries to replay it on top of master. Since origin/linux-6.13.y has moved forward over time, that set likely includes a large part of the stable kernel history, not just your own changes. That explains why you are seeing conflicts in files you never touched.

This also matches what git status reports:
    Your branch is ahead of 'origin/linux-6.13.y' by 2012 commits.

Those 2012 commits are not yours; they are the commits that accumulated on the linux-6.13.y branch since you originally branched from it.

What you usually want is to rebase only the commits you authored. To
do that, you need to find the commit
where your work originally forked from linux-6.13.y, for example:
    base=$(git merge-base HEAD origin/linux-6.13.y)
    git rebase --onto master $base

This tells Git to replay only the commits after that fork point, which should be just your patches.

Regarding previewing what will be rebased, there is not a simple "how
many conflicts" dry run, but git range-diff
is very useful to see what would be moved:
    git range-diff $base..HEAD master

That shows exactly which commits would be replayed and how they would compare after rebasing.

I hope this clarifies why you saw those conflicts and helps you move forward.

Best, Pushkar

On Sun, Jan 11, 2026 at 9:25 PM Alan Mackenzie <acm@muc.de> wrote:
Show 15 quoted lines
>
> On Sun, Jan 11, 2026 at 15:33:51 +0000, Alan Mackenzie wrote:
> > Hello, Git.
>
> > Some while ago I made some amendments to the Linux kernel for my own use
> > (at least).  I now want to rebase these changes onto the master branch of
> > the Linux Stable repository.
>
> [ .... ]
>
> Sorry, I forgot to mention I'm using git version 2.52.0.
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>
Previous: Alan Mackenzie
Message 2 of 2 in “Re: Difficulties using git rebase. Help, please!”
  1. Alan MackenzieJan 11, 2026
  2. Pushkar SinghJan 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.