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

Re: Difficulties using git rebase. Help, please!

From
AMAlan Mackenzie <acm@muc.de>
Date
Jan 12, 2026, 15:45 UTC
Message-ID
<aWUXGCI3fJc_Z4vp@MAC.fritz.box>
In-Reply-To
<aWPFxQloyfx8x0ED@MAC.fritz.box>
Hello again, Git.
On Sun, Jan 11, 2026 at 15:46:13 +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.
> When I wrote the changes, I based them off branch linux-6.13.y.  The
> command I tried to rebase with was, with PWD being the pertinent copy of
> the Linux repository:
>     $ git rebase --onto master origin/linux-6.13.y HEAD
> ..  This didn't work well.  In particular, I got a conflict in a file that
> I had never changed.  Why?
> Well, I corrected the conflicts in that file, git add'ed it, git rebase
> --continue'd, then got another conflict in a file I'd never touched.
> Same again.  After the third such conflict, I gave up with git rebase
> --abort.
Show 6 quoted lines
> Criticism: there doesn't appear to be a --dry-run option in git rebase,
> with which one can see how many files will be conflicted.  Instead they
> are notified one at a time, drip, drip, drip, .... to the user.  In my
> case there might have been four conflicted files, there might have been a
> thousand.  Either I'm missing something, or git rebase is missing
> something, hopefully the former.
> Incidentally, when I do git status, I get as part of the output:
>     Your branch is ahead of 'origin/linux-6.13.y' by 2012 commits.
> ..  I haven't done 2012 git commits in my life.  What does this number
> 2012 mean?
> So, back to git rebase.  Would somebody please explain why I am seeing
> these conflicts at all?  Please also help me make progress.  I'm stuck.
> Thanks!
I've had a most helpful reply by private email that suggested I try:
    git log --oneline origin/linux-6.13.y..HEAD | wc -l

.. This gave 2012, the number of commits git status says I'm ahead of that branch by.

On removing the | wc -l from the command line, I see all these 2012 commits summarised. It turns out, just the top eight were mine, followed by

    733381204a86 Linux 6.13.3-rc1

.. So if I delimit the commits to apply using 733381204a86 rather than origin/linux-6.13.y, the rebasing should work. So I tried:

    $ git rebase --onto master 733381204a86 HEAD

, which now gives me conflicts just in my own commits. Success! I now have the arduous task of resolving all these conflicts. The diff I'm working with is around 3400 lines long. ;-(

So many thanks to my helper. Why don't you say who you are and collect the credit you seem to be due?

-- 
Alan Mackenzie (Nuremberg, Germany).
Previous: Alan MackenzieNext: Kristoffer Haugsbakk
Message 2 of 5 in “Difficulties using git rebase. Help, please!”
  1. Alan MackenzieJan 11, 2026
  2. Alan MackenzieJan 12, 2026
  3. Kristoffer HaugsbakkJan 12, 2026
  4. Jeff KingJan 13, 2026
  5. Pushkar SinghJan 13, 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.