aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-rebase.txt
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-06-27 00:23:17 -0700
committerJunio C Hamano <gitster@pobox.com>2018-06-27 11:23:22 -0700
commit0661e49aeb842a29f2ebbd7b005ec5824c2b87e1 (patch)
tree2eefeb88be6af711961ec0112434794b9be229c8 /Documentation/git-rebase.txt
parent4d34dffbdd2226034df9d7612f1e221b7143fc6a (diff)
downloadgit-0661e49aeb842a29f2ebbd7b005ec5824c2b87e1.tar.gz
git-rebase.txt: document behavioral differences between modes
There are a variety of aspects that are common to all rebases regardless of which backend is in use; however, the behavior for these different aspects varies in ways that could surprise users. (In fact, it's not clear -- to me at least -- that these differences were even desirable or intentional.) Document these differences. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rebase.txt')
-rw-r--r--Documentation/git-rebase.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 2f47495a4d..a67df4caba 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -546,6 +546,38 @@ Other incompatible flag pairs:
* --rebase-merges and --strategy
* --rebase-merges and --strategy-option
+BEHAVIORAL DIFFERENCES
+-----------------------
+
+ * empty commits:
+
+ am-based rebase will drop any "empty" commits, whether the
+ commit started empty (had no changes relative to its parent to
+ start with) or ended empty (all changes were already applied
+ upstream in other commits).
+
+ merge-based rebase does the same.
+
+ interactive-based rebase will by default drop commits that
+ started empty and halt if it hits a commit that ended up empty.
+ The `--keep-empty` option exists for interactive rebases to allow
+ it to keep commits that started empty.
+
+ * empty commit messages:
+
+ am-based rebase will silently apply commits with empty commit
+ messages.
+
+ merge-based and interactive-based rebases will by default halt
+ on any such commits. The `--allow-empty-message` option exists to
+ allow interactive-based rebases to apply such commits without
+ halting.
+
+ * directory rename detection:
+
+ merge-based and interactive-based rebases work fine with
+ directory rename detection. am-based rebases sometimes do not.
+
include::merge-strategies.txt[]
NOTES