Howto-RebaseTopicBranches

Rebasing Topc Branches

For the purpose of this example we will assume the following:

  • You are rebasing the ec2 branch onto the master branch.
  • The master branch contains the tag "Ubuntu-2.6.32-29.58" at the point where you want the rebase.
  • Clone a new copy of the Lucid kernel tree
     git clone zinc.canonical.com:/srv/kernel.ubuntu.com/git/ubuntu/ubuntu-karmic.git
  • For purposes of this example we will be rebasing the ec2 topic branch
     cd ubuntu-karmic
     git branch --track ec2 origin/ec2
  • Before rebasing the ec2 branch it must be prepared. If a "start new release" has not been performed upon it, that must be done.
     git co ec2
     maint-startnewrelease
     git co master
  • Do the rebase.
     maint-rebase-branch ec2 Ubuntu-2.6.32-29.58
  • Once the rebase completes successfully, inspect the rebase. You should be currently in a temporary topic branch named "auto-tmp-rebase".
  • Once you are satisfied that the rebase worked the way you wanted, fixup the actual ec2 topic branch.
     git co ec2
     git reset --hard auto-tmp-rebase
  • You can now go on to finish up this branch for release and testing.

See Also:

  • Kteam Tools

    A repository of useful tools. This is where maint-rebase-branch comes from.

To Do:

  1. Create another wiki page that show how to do this without using the script for the times the script fails.

Kernel/Dev/Howto-RebaseTopicBranches (last edited 2011-03-02 22:49:19 by brad-figg)