SecondGear
SecondGear

Reputation: 1113

Git merge: accept theirs for multiple conflicts

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?

Upvotes: 74

Views: 56497

Answers (1)

Ash Wilson
Ash Wilson

Reputation: 24478

This will do it (does not just resolve the conflicts but takes their version of the files) 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

Upvotes: 135

Related Questions