What is the default behaviour of "Resolve using theirs" in git

As per this question, I know it is possible to keep all changes that did not raise any conflict, while using their changes for the conflicting changes.

What I would like to know is, when using SourceTree (or, if relevant, any git tool or even the command line), what is the default behaviour when choosing Resolve using theirs on a single file (or even the complete merge).

  • Does it simply replace the complete local file with whatever is in the remote ?
  • Does it keep all the local non conflicting changes and only use theirs for all the conflicts?

  • It resolves the non conflicting changes and prefers theirs for conflicting ones. (The opposite for ours )

    From 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.
    
    链接地址: http://www.djcxy.com/p/45032.html

    上一篇: 如果只想使用源文件或目标文件,Git如何合并冲突

    下一篇: git中“解析使用他们”的默认行为是什么?