Git merge strategy 'theirs' is not resolving modify/delete conflict

Looks like theirs option of recursive strategy (this is what you actually use, see the [1]) does not affect tree merging, it is used only for file content merging when both files modified only. I don't really know if there is any merge command option which can do what you want. You could try to make a script which scans conflicted files (with git status --porcelain) and then either removes the file (git rm --force <file>) or get the remote version of it (git checkout --theirs <file>)

[1] https://www.kernel.org/pub/software/scm/git/docs/git-merge.html#_merge_strategies


A bit late but might be useful, you can resolve this type of conflict with:

git merge -X theirs master
git diff --name-only --diff-filter=U | xargs git rm

Basically it means "delete all unmerged files" during the conflict resolution.

Tags:

Git