Git 合并:接受他们的多个冲突
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22544305/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 17:54:05 来源:igfitidea点击:
Git merge: accept theirs for multiple conflicts
提问by SecondGear
I'm trying to merge a git branch (test-development) back into master. There are lots of merge conflicts but I want as many as possible to be resolved via --theirs. Is there a way to tell git to merge with --theirs in bulk?
我正在尝试将 git 分支(测试开发)合并回 master。有很多合并冲突,但我希望通过 --theirs 解决尽可能多的冲突。有没有办法告诉 git 与 --theirs 批量合并?
回答by Ash Wilson
This will do it if you're mid-merge:
如果您在合并中,这将做到这一点:
git merge test-development
# Automatic merge failed, a bunch of conflicts!
git checkout --theirs ./path
git add ./path
git commit