Home Explore Blog CI



git

5th chunk of `Documentation/git-rebase.adoc`
1af35b745f52ba484ef3aa72028f2ac68537084149613ea90000000100000fa1
 commit (unless `--quiet` is given). Advice will also be issued
unless `advice.skippedCherryPicks` is set to false (see
linkgit:git-config[1]).
+
`--reapply-cherry-picks` allows rebase to forgo reading all upstream
commits, potentially improving performance.
+
See also INCOMPATIBLE OPTIONS below.

--allow-empty-message::
	No-op.  Rebasing commits with an empty message used to fail
	and this option would override that behavior, allowing commits
	with empty messages to be rebased.  Now commits with an empty
	message do not cause rebasing to halt.
+
See also INCOMPATIBLE OPTIONS below.

-m::
--merge::
	Using merging strategies to rebase (default).
+
Note that a rebase merge works by replaying each commit from the working
branch on top of the `<upstream>` branch.  Because of this, when a merge
conflict happens, the side reported as 'ours' is the so-far rebased
series, starting with `<upstream>`, and 'theirs' is the working branch.
In other words, the sides are swapped.
+
See also INCOMPATIBLE OPTIONS below.

-s <strategy>::
--strategy=<strategy>::
	Use the given merge strategy, instead of the default `ort`.
	This implies `--merge`.
+
Because `git rebase` replays each commit from the working branch
on top of the `<upstream>` branch using the given strategy, using
the `ours` strategy simply empties all patches from the `<branch>`,
which makes little sense.
+
See also INCOMPATIBLE OPTIONS below.

-X <strategy-option>::
--strategy-option=<strategy-option>::
	Pass the <strategy-option> through to the merge strategy.
	This implies `--merge` and, if no strategy has been
	specified, `-s ort`.  Note the reversal of 'ours' and
	'theirs' as noted above for the `-m` option.
+
See also INCOMPATIBLE OPTIONS below.

include::rerere-options.adoc[]

-S[<keyid>]::
--gpg-sign[=<keyid>]::
--no-gpg-sign::
	GPG-sign commits. The `keyid` argument is optional and
	defaults to the committer identity; if specified, it must be
	stuck to the option without a space. `--no-gpg-sign` is useful to
	countermand both `commit.gpgSign` configuration variable, and
	earlier `--gpg-sign`.

-q::
--quiet::
	Be quiet. Implies `--no-stat`.

-v::
--verbose::
	Be verbose. Implies `--stat`.

--stat::
	Show a diffstat of what changed upstream since the last rebase. The
	diffstat is also controlled by the configuration option rebase.stat.

-n::
--no-stat::
	Do not show a diffstat as part of the rebase process.

--no-verify::
	This option bypasses the pre-rebase hook.  See also linkgit:githooks[5].

--verify::
	Allows the pre-rebase hook to run, which is the default.  This option can
	be used to override `--no-verify`.  See also linkgit:githooks[5].

-C<n>::
	Ensure at least `<n>` lines of surrounding context match before
	and after each change.  When fewer lines of surrounding
	context exist they all must match.  By default no context is
	ever ignored.  Implies `--apply`.
+
See also INCOMPATIBLE OPTIONS below.

--no-ff::
--force-rebase::
-f::
	Individually replay all rebased commits instead of fast-forwarding
	over the unchanged ones.  This ensures that the entire history of
	the rebased branch is composed of new commits.
+
You may find this helpful after reverting a topic branch merge, as this option
recreates the topic branch with fresh commits so it can be remerged
successfully without needing to "revert the reversion" (see the
link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for
details).

--fork-point::
--no-fork-point::
	Use reflog to find a better common ancestor between `<upstream>`
	and `<branch>` when calculating which commits have been
	introduced by `<branch>`.
+
When `--fork-point` is active, 'fork_point' will be used instead of
`<upstream>` to calculate the set of commits to rebase, where
'fork_point' is the result of `git merge-base --fork-point <upstream>
<branch>` command (see linkgit:git-merge-base[1]).  If 'fork_point'
ends up being empty, the `<upstream>` will be used as a fallback.
+
If `<upstream>` or `--keep-base` is given on the command

Title: Git Rebase Command Options Continued
Summary
The git rebase command has additional options including --allow-empty-message, --merge, --strategy, --strategy-option, --gpg-sign, --quiet, --verbose, --stat, --no-verify, and --fork-point, which provide further control over the rebasing process, commit signing, and output, allowing for customized and flexible rebasing workflows.