I have a problem where I need to merge from master to a branch. The branch however can
- ignore certain files from master while merging and keep its own copy always and not in case of conflict alone)
- For certain files, in case of conflict master file should be taken
- for certain files we can ignore any rename/delete conflict.
- I have a partial solution that works in case of a conflict by using .gitattributes as descibed here
- while using .gitattributes file, with merge as ours, the 2nd problem is not solved. where i want to keep files from master. I see that in case of conflict, git resolves autoatically assuimg ours (branch) version as one to resolve conflict. Is there a way to specify ours and theirs merge driver together like below with git using the .gitattributes to resolve?
git config --global merge.ours.driver true git config --global merge.theirs.driver true
for ignoring rename/delete conflict, I could only find the generic form where all delete / rename conflicts are ignored using git command while in branch.
git merge -s recursive -X no-rename
Is there a way perhaps to use .gtattributes to explictly specify the files for which rename/delete can be ignored?
Sorry for asking too many questions in one go but need some direction urgently for my project.
Thanks in advance