What is the best way to rebase against linux-next
Tim Gardner
tim.gardner at canonical.com
Thu Apr 30 12:17:45 UTC 2009
Andy Whitcroft wrote:
> On Wed, Apr 29, 2009 at 09:31:44AM -0600, Tim Gardner wrote:
>> Andy,
>>
>> I've been experimenting with keeping ubuntu-next up to date with
>> linux-next, but I'm having some problems getting a clean rebase while
>> still preserving some local changes (such as the commit that adds the
>> debian directory).
>>
>> This is what I'm doing:
>>
>> git remote add next
>> git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git
>> git fetch next
>> git rebase next/master
>>
>> The rebase conflicts frequently (as you might expect), so I just 'git
>> rebase --skip' thinking that this performs the upstream commit and drops
>> the local conflicting commit. At the end of the process I compared the 2
>> trees and found some differences that I did not expect. Any thoughts?
>
> Ahh yes I can see where the issue is coming from. I would actually not
> expect a rebase (of our delta) to conflict at all as we should only have
> changes outside of the tree.
>
> I surmise you are getting conflicts because the next tree itself is a
> rebase tree. Therefore when you rebase it attempts to move all of
> linux-next (old) over to linux-next (new) and that isn't what you
> wanted. You only wanted our ubuntu commits rebased. This would be a
> case where you would want to use the rebase --onto option, something
> like the following where N represents how many ubuntu specific commits
> there are; 2 in my tree here.
>
> git rebase --onto next/master HEAD~N
>
> It would be common to do something like placing a tag at the tip so you
> can use that for the next rebase:
>
> git rebase --onto next/master ubuntu-next-base
> git tag -f ubuntu-next-base next/master
>
> -apw
Captured in https://wiki.ubuntu.com/KernelTeam/GitCheatSheet
--
Tim Gardner tim.gardner at canonical.com
More information about the kernel-team
mailing list