根据this question,我知道可以保留所有未引起任何冲突的更改,同时对冲突的更改使用their
更改。
我想知道的是,当使用SourceTree(或相关的任何git工具甚至命令行)时,在单个文件上选择Resolve using theirs
时的默认行为(甚至是完全合并)。
theirs
?答案 0 :(得分:4)
它解决了非冲突的更改,并且更喜欢theirs
用于冲突的更改。 (与ours
相反)
来自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.
答案 1 :(得分:0)
不幸的是,如果文件发生冲突,而您选择“使用其解析”,则Git会将完整的本地文件替换为它们的文件,而不仅仅是冲突行。