Git resolve conflict using --ours/--theirs for all files

前端 未结 6 658

Is there a way to resolve conflict for all files using checkout --ours and --theirs? I know that you can do it for individual files but couldn\'t f

6条回答
  •  离开以前
    2020-12-22 17:22

    In case anyone else is looking to simply overwrite everything from one branch (say master) with the contents of another, there's an easier way:

    git merge origin/master --strategy=ours
    

    Thanks to https://stackoverflow.com/a/1295232/560114

    Or for the other way around, see Is there a "theirs" version of "git merge -s ours"?

提交回复
热议问题