Same ask as Resolve Git merge conflicts in favor of their changes during a pull
Instead, not during a pull
but during rebase
.
git rebase
has the option of:
-s, --strategy <strategy>
use the given merge strategy
I tried to use the recursive "theirs" strategy option as per here:
git merge --strategy-option theirs
From the man:
ours
This option forces conflicting hunks to be auto-resolved cleanly by
favoring our version. Changes from the other tree that do not
conflict with our side are reflected to the merge result.
This should not be confused with the ours merge strategy, which does
not even look at what the other tree contains at all. It discards
everything the other tree did, declaring our history contains all that
happened in it.
theirs
This is opposite of ours.
But when I tried it, I got:
$ git rebase -s theirs master addon/btx
git: 'merge-theirs' is not a git command. See 'git --help'.
BTW,
$ git version
git version 2.30.2