Links
Usage
git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>] git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>] git rebase --continue | --skip | --abort | --edit-todo
Options
--onto <newbase>-
Starting point at which to create the new commits.
If the
--ontooption is not specified, the starting point is<upstream>.You may use
A...Bas a shortcut for the merge base of A and B if there is exactly one merge base. (You can leave out at most one of A and B, in which case it defaults to HEAD.) --root-
Rebase all commits reachable from
<branch>, instead of limiting them with an<upstream>.This allows you to rebase the root commit(s) on a branch. When used with
--onto, it will skip changes already contained in<newbase>(instead of<upstream>) whereas without--ontoit will operate on every change.When used together with both
--ontoand--preserve-merges, all root commits will be rewritten to have<newbase>as parent instead.