Фактически, используя терминологию Git, вы хотите отбросить «наши» и сохранить «их». Это потому, что вы находитесь на ветке B, когда вы делаете слияние, что делает это «нашим».
git checkout B
git merge -s recursive -X theirs A
Из документации:
The recursive strategy can take the following options:
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. For a binary file, the entire contents are taken from
our side.
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 the opposite of ours.
Я задаюсь вопросом, почему документы относятся к нему является «ломоть» это просто опечатка в оригинале документы, где они хотели написать «кусок»? –
@PhilipKirkbride, я мог только размышлять о том, почему этот термин был выбран. Но это не опечатка: [hunks указаны во всем исходном коде Git] (https://github.com/git/git/search?utf8=%E2%9C%93&q=hunk) и [documentation] (https: // git-scm.com/docs/git-add). – Chris