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

前端 未结 18 1508
傲寒
傲寒 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:57

    This one uses a git plumbing command read-tree, but makes for a shorter overall workflow.

    git checkout 
    
    git merge --no-commit -s ours 
    git read-tree -u --reset 
    git commit
    
    # Check your work!
    git diff 
    

提交回复
热议问题