Skip to content

Commit 2dddf82

Browse files
newrenderrickstolee
authored andcommitted
git-rebase.txt: correct antiquated claims about --rebase-merges
When --rebase-merges was first introduced, it only worked with the `recursive` strategy. Some time later, it gained support for merges using the `octopus` strategy. The limitation of only supporting these two strategies was documented in 25cff9f ("rebase -i --rebase-merges: add a section to the man page", 2018-04-25) and lifted in e145d99 ("rebase -r: support merge strategies other than `recursive`", 2019-07-31). However, when the limitation was lifted, the documentation was not updated. Update it now. Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Elijah Newren <[email protected]>
1 parent 61a4750 commit 2dddf82

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Documentation/git-rebase.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,12 +1219,16 @@ successful merge so that the user can edit the message.
12191219
If a `merge` command fails for any reason other than merge conflicts (i.e.
12201220
when the merge operation did not even start), it is rescheduled immediately.
12211221

1222-
At this time, the `merge` command will *always* use the `recursive`
1223-
merge strategy for regular merges, and `octopus` for octopus merges,
1224-
with no way to choose a different one. To work around
1225-
this, an `exec` command can be used to call `git merge` explicitly,
1226-
using the fact that the labels are worktree-local refs (the ref
1227-
`refs/rewritten/onto` would correspond to the label `onto`, for example).
1222+
By default, the `merge` command will use the `recursive` merge
1223+
strategy for regular merges, and `octopus` for octopus merges. One
1224+
can specify a default strategy for all merges using the `--strategy`
1225+
argument when invoking rebase, or can override specific merges in the
1226+
interactive list of commands by using an `exec` command to call `git
1227+
merge` explicitly with a `--strategy` argument. Note that when
1228+
calling `git merge` explicitly like this, you can make use of the fact
1229+
that the labels are worktree-local refs (the ref `refs/rewritten/onto`
1230+
would correspond to the label `onto`, for example) in order to refer
1231+
to the branches you want to merge.
12281232

12291233
Note: the first command (`label onto`) labels the revision onto which
12301234
the commits are rebased; The name `onto` is just a convention, as a nod

0 commit comments

Comments
 (0)