Next: Cherry Picking, Previous: Resolving Conflicts, Up: Manipulating [Contents][Index]
Also see the git-rebase(1) manpage. For information on how to resolve conflicts that occur during rebases see the preceding section.
magit-rebase-popup
)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.
magit-rebase-onto-pushremote
)Rebase the current branch onto branch.<name>.pushRemote
. If that
variable is unset, then rebase onto remote.pushDefault
.
magit-rebase-onto-upstream
)Rebase the current branch onto its upstream branch.
magit-rebase
)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."
magit-rebase-subset
)Start a non-interactive rebase sequence with commits from START to
HEAD
onto NEWBASE. START has to be selected from a list of recent
commits.
Note that the popup also features the infix argument --interactive
.
This can be used to turn one of the above non-interactive rebase
variants into an interactive rebase.
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 master
.
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.
Explicitly enabling --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.
magit-rebase-interactive
)Start an interactive rebase sequence.
magit-rebase-autosquash
)Combine squash and fixup commits with their intended targets.
magit-rebase-edit-commit
)Edit a single older commit using rebase.
magit-rebase-reword-commit
)Reword a single older commit using rebase.
When a rebase is in progress, then the popup buffer features these commands instead.
magit-rebase-continue
)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.
magit-rebase-skip
)Skip the current commit and restart the current rebase operation.
magit-rebase-edit
)Edit the todo list of the current rebase operation.
magit-rebase-abort
)Abort the current rebase operation, restoring the original branch.
• Editing Rebase Sequences: | ||
• Information About In-Progress Rebase: |
Next: Cherry Picking, Previous: Resolving Conflicts, Up: Manipulating [Contents][Index]