TL/DR
How can we make git merge prefer their deletion over our move ?
I tried
git merge origin/develop --strategy-option theirs
but this results in (trimmed)
$ git merge origin/develop --strategy-option theirs
...
CONFLICT (rename/delete): olddir1/src/xxx.cls renamed to newroot/src/xxx.cls in HEAD, but deleted in origin/develop.
...
CONFLICT (rename/delete): olddir2/src/yyy.w renamed to newroot/src/yyy.w in HEAD, but deleted in origin/develop.
...
Automatic merge failed; fix conflicts and then commit the result.
Is there an option to automatically resolve this to their deletion ?
I looked at Resolve Git merge conflicts in favor of their changes during a pull, but the answers there don't seem to apply to this particular case.
Background info
We are doing some major re-ordering of directories in our git repo.
Our development is done in a develop branch.
The re-ordering is done in a branch develop23, this will eventually become the new develop branch, but at the moment we are just testing the effect the reordering has on our application and on the EDI.
The only changes done in develop23 are lots of git mv
's and a couple of git rm
's. All code changes are still done in the develop branch.
At first, it seemed that updates to develop could be merged effortlessly into develop23. Everything found its way to the new location, but now I'm seeing conflicts on rename/delete.
Can I automate resolving this to their deletion ?