I have special branch (release branch) which is an exact copy of master branch with some files and directories removed. No development is happening on this branch, however it must be in sync with master, so updates on master must be constantly pushed to that branch.
By doing a normal merge (git merge master
) I constantly get conflicts like (a sample README file for example):
CONFLICT (delete/modify): README deleted in HEAD and modified in master
which is expected: I try to merge changes in files, that I've deleted. So, to resolve them I jut use git rm README
.
To automate it, I though I could use automatic conflict resolution by specifying -X ours. Man pages suggest it is a right thing for me:
This option forces conflicting hunks to be auto-resolved cleanly by favoring our version. Changes from the other tree that do not conflict with our side are reflected to the
merge result.
However, when I do git merge -s recursive -X ours master
I still get the same unresolved delete/modify conflicts. What am I doing wrong? Is there another way to automate conflict resolution?