How to automatically resolve merge conflicts by selecting the remote version in Git?

前端 未结 2 678
离开以前
离开以前 2021-01-01 16:33

Is there any way to specify to git to automatically resolve the conflicts for a pack of files by taking the remote version for each of them? For instance, to take the remote

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-01 17:21

    You can use recursive strategy (-s) with theirs option (-X). That is:

    git merge -s recursive -X theirs source_branch
    

提交回复
热议问题