git-rebase

git-rebase - Reapply commits on top of another
base tip

Assume the following history exists and the
current branch is “topic”:

          A---B---C topic
         /
    D---E---F---G master

From this point, the result of either of the
following commands:

git rebase master
git rebase master topic

would be:

                  A'--B'--C' topic
                 /
    D---E---F---G master