There are a couple answers on how to do it (this and that) suggesting to use a custom driver, which seem quite fine.
However, there is that particular situation when a given file isn't changed in the merged branch so git won't even call the merge driver, but simply overwrite the file.
Is there a way to effectively prevent from happening?
[EDIT]
To clarify, every merge realized contains an excel with the local environment configurations, i.e. every developer's local settings. Such file is rarely edited which normally causes it to be overwritten at every pull I make from the master branch.
Mind that there are some other details in this file which might have been edited and I'd want to update in my own version so it is still important to have it updated. I just wish it always caused a conflict to be manually sorted so I could keep my local configurations and update the rest (even if I had to do it manually).
Also imoprtant to note that this file cannot be split to make my life easier.