Most git rebase
commands actually do run git cherry-pick
.
The fallback you're seeing occurs from the one form of git rebase
that, for historical reasons, doesn't use git cherry-pick
. That one form is used when you invoke a non-interactive git-rebase
and don't use any of the options that make it use new-and-improved rebase-invoking method.
The old form usually produces the same effect. It consists of using git format-patch
to turn each commit into a patch, and then using git am --3way
to apply all the formatted patches. The --3way
option tells git am
that, if the patch cannot be applied blindly, it should use the index
lines in each formatted patch to achieve part of what git cherry-pick
would have done automatically.
If you want rebase to use git cherry-pick
directly, you may:
- supply the
-k
option, or
- supply the
-m
option, or
- supply a
-s strategy
option, or
- supply a
-X extended-option
option, or
- use interactive rebase (
-i
or --interactive
), or
- use the
--autosquash
option, or
- use the
-p
or (Git 2.18+) -r
option.