Is there a “theirs” version of “git merge -s ours”?

前端 未结 18 1500
傲寒
傲寒 2020-11-22 06:42

When merging topic branch \"B\" into \"A\" using git merge, I get some conflicts. I know all the conflicts can be solved using the version in \"B\".

I a

18条回答
  •  旧巷少年郎
    2020-11-22 06:59

    I used the answer from Paul Pladijs since now. I found out, you can do a "normal" merge, conflicts occur, so you do

    git checkout --theirs 
    

    to resolve the conflict by using the revision from the other branch. If you do this for each file, you have the same behaviour as you would expect from

    git merge  -s theirs
    

    Anyway, the effort is more than it would be with the merge-strategy! (This was tested with git version 1.8.0)

提交回复
热议问题