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

前端 未结 6 660

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:26

    git diff --name-only --diff-filter=U | xargs git checkout --theirs
    

    Seems to do the job. Note that you have to be cd'ed to the root directory of the git repo to achieve this.

提交回复
热议问题