Also see the git-rebase(1) manpage. For information on how to resolve conflicts that occur during rebases see the preceding section.
This prefix command shows the following suffix commands along with the appropriate infix arguments in a popup buffer.
When no rebase is in progress, then the popup buffer features the following commands.
Using one of these commands starts a rebase sequence. Git might then stop somewhere along the way, either because you told it to do so, or because applying a commit failed due to a conflict. When that happens, then the status buffer shows information about the rebase sequence which is in progress in a section similar to a log section. See Information About In-Progress Rebase.
Rebase the current branch onto
branch.<name>.pushRemote. If that
variable is unset, then rebase onto
Rebase the current branch onto its upstream branch.
Rebase the current branch onto a branch read in the minibuffer. All commits that are reachable from head but not from the selected branch TARGET are being rebased."
Start a non-interactive rebase sequence with commits from START to
HEAD onto NEWBASE. START has to be selected from a list of recent
By default Magit uses the
--autostash argument, which causes
uncommitted changes to be stored in a stash before the rebase begins.
These changes are restored after the rebase completes and if possible
the stash is removed. If the stash does not apply cleanly, then the
stash is not removed. In case something goes wrong when resolving
the conflicts, this allows you to start over.
Even though one of the actions is dedicated to interactive rebases,
the popup also features the infix argument
--interactive. This can be
used to turn one of the other, non-interactive rebase variants into an
For example if you want to clean up a feature branch and at the same
time rebase it onto
master, then you could use
r-iu. But we recommend
that you instead do that in two steps. First use
ri to cleanup the
feature branch, and then in a second step
ru to rebase it onto
That way if things turn out to be more complicated than you thought
and/or you make a mistake and have to start over, then you only have
to redo half the work.
--interactive won’t have an effect on the
following commands as they always use that argument anyway, even if it
is not enabled in the popup.
Start an interactive rebase sequence.
Combine squash and fixup commits with their intended targets.
Edit a single older commit using rebase.
Reword a single older commit using rebase.
Remove a single older commit using rebase.
When a rebase is in progress, then the popup buffer features these commands instead.
Restart the current rebasing operation.
In some cases this pops up a commit message buffer for you do edit. With a prefix argument the old message is reused as-is.
Skip the current commit and restart the current rebase operation.
Edit the todo list of the current rebase operation.
Abort the current rebase operation, restoring the original branch.
|• Editing Rebase Sequences:|
|• Information About In-Progress Rebase:|