Git merge: accept theirs for multiple conflicts

GitMergeMerge Conflict-Resolution

Git Problem Overview


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 Solutions


Solution 1 - Git

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSecondGearView Question on Stackoverflow
Solution 1 - GitAsh WilsonView Answer on Stackoverflow