summaryrefslogtreecommitdiff
path: root/Documentation/git-rebase.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-rebase.txt')
-rw-r--r--Documentation/git-rebase.txt39
1 files changed, 29 insertions, 10 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index c8ab48d..0387b40 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -3,7 +3,7 @@ git-rebase(1)
NAME
----
-git-rebase - Forward-port local commits to the updated upstream head
+git-rebase - Reapply commits on top of another base tip
SYNOPSIS
--------
@@ -80,7 +80,7 @@ remain the checked-out branch.
If the upstream branch already contains a change you have made (e.g.,
because you mailed a patch which was applied upstream), then that commit
will be skipped. For example, running `git rebase master` on the
-following history (in which A' and A introduce the same set of changes,
+following history (in which `A'` and `A` introduce the same set of changes,
but have different committer information):
------------
@@ -207,12 +207,21 @@ rebase.stat::
Whether to show a diffstat of what changed upstream since the last
rebase. False by default.
-rebase.autosquash::
+rebase.autoSquash::
If set to true enable '--autosquash' option by default.
-rebase.autostash::
+rebase.autoStash::
If set to true enable '--autostash' option by default.
+rebase.missingCommitsCheck::
+ If set to "warn", print warnings about removed commits in
+ interactive mode. If set to "error", print the warnings and
+ stop the rebase. If set to "ignore", no checking is
+ done. "ignore" by default.
+
+rebase.instructionFormat::
+ Custom commit list format to use during an '--interactive' rebase.
+
OPTIONS
-------
--onto <newbase>::
@@ -285,7 +294,9 @@ which makes little sense.
-S[<keyid>]::
--gpg-sign[=<keyid>]::
- GPG-sign commits.
+ 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.
-q::
--quiet::
@@ -359,6 +370,10 @@ default is `--no-fork-point`, otherwise the default is `--fork-point`.
Make a list of the commits which are about to be rebased. Let the
user edit that list before rebasing. This mode can also be used to
split commits (see SPLITTING COMMITS below).
++
+The commit list format can be changed by setting the configuration option
+rebase.instructionFormat. A customized instruction format will automatically
+have the long commit hash prepended to the format.
-p::
--preserve-merges::
@@ -376,9 +391,6 @@ idea unless you know what you are doing (see BUGS below).
final history. <cmd> will be interpreted as one or more shell
commands.
+
-This option can only be used with the `--interactive` option
-(see INTERACTIVE MODE below).
-+
You may execute several commands by either using one instance of `--exec`
with several commands:
+
@@ -391,6 +403,9 @@ or by giving more than one `--exec`:
If `--autosquash` is used, "exec" lines will not be appended for
the intermediate commits, and will only appear at the end of each
squash/fixup series.
++
+This uses the `--interactive` machinery internally, but it can be run
+without an explicit `--interactive`.
--root::
Rebase all commits reachable from <branch>, instead of
@@ -416,10 +431,11 @@ squash/fixup series.
This option is only valid when the '--interactive' option is used.
+
If the '--autosquash' option is enabled by default using the
-configuration variable `rebase.autosquash`, this option can be
+configuration variable `rebase.autoSquash`, this option can be
used to override and disable this setting.
---[no-]autostash::
+--autostash::
+--no-autostash::
Automatically create a temporary stash before the operation
begins, and apply it after the operation ends. This means
that you can run rebase on a dirty worktree. However, use
@@ -514,6 +530,9 @@ rebasing.
If you just want to edit the commit message for a commit, replace the
command "pick" with the command "reword".
+To drop a commit, replace the command "pick" with "drop", or just
+delete the matching line.
+
If you want to fold two or more commits into one, replace the command
"pick" for the second and subsequent commits with "squash" or "fixup".
If the commits had different authors, the folded commit will be