Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 441
SecondGear Avatar asked Mar 20 '14 20:03

SecondGear


People also ask

How do you resolve conflict with theirs?

In order to resolve the conflict use TortoiseGit → Resolve... and then right click on the conflicted file and choose one of Resolved (the current version of the file which is in the working tree will be used), Resolve conflict using 'mine' (the version of the file of your HEAD will be used), and Resolve conflict using ...

How do I accept all changes in merge conflict?

right click file with conflicts without left-click / opening file in editor pane. click "Accept all Incoming" / "Accept all Current" no changes are accepted, file in list remains unchanged.

What happens if you get a conflict during a merge?

A merge conflict is an event that occurs when Git is unable to automatically resolve differences in code between two commits. When all the changes in the code occur on different lines or in different files, Git will successfully merge commits without your help.


1 Answers

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 
like image 186
Ash Wilson Avatar answered Sep 29 '22 09:09

Ash Wilson