Re: How to switch kernel customizations from 2.6.15.6 to 2.6.16?
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Mar 29, 2006, 02:23 UTC
- Message-ID
- <20060329022330.GA15359@spearce.org>
- In-Reply-To
- <1143596622.2481.10.camel@mattlaptop.metaesthetics.net>
Matt McCutchen <hashproduct@verizon.net> wrote:
Show 18 quoted lines
> Dear git people, > > I made a customized Linux kernel based on 2.6.15.6 by cloning the stable > 2.6.15 kernel repository (which was then at version 2.6.15.6) and making > several commits. Now I would like a Linux kernel based on 2.6.16 with > the same customizations. This seems to be a very simple task, but I > have been trying various combinations of git commands for several days > and have not figured out how to do it. > > I believe that means I should pull the 2.6.16 kernel into the "origin" > branch and then rebase the "master" branch, merging my customizations > with 2.6.16. To this end, I switched my remote file to point to the > 2.6.16 stable repository and tried to pull. The result was not what I > wanted. The situation is complicated by the fact that 2.6.15.6 is not > an ancestor of 2.6.16. The warning in the man page about branches that > are modified nonlinearly seems to apply. > > How do I make my customized 2.6.16 kernel?
I think you want to use `git-fetch --force` to download origin but not immediately merge it yet. This will bypass the not-an-ancestor check you are running into.
Then you can perform the rebase yourself with:
# Export your local changes into a series of patches. # git-format-patch -k --stdout --full-index v2.6.16.6 >changes.mbox
# Checkout the new origin (2.6.16) into master. # git-reset --hard origin
# Now apply your patches. # git-am --binary -3 changes.mbox
If you get merge conflicts fix them up and restart with `git-am --resolved`.
Note this is the logic of `git-rebase` except it doesn't require you to actually have a common ancestor, while `git-rebase` does.
-- Shawn.