You can declare a merge driver, but that means you have to define it on the git config, as in ".gitattributes
& individual merge strategy for a file":
[merge "ours"]
name = "Keep ours merge"
driver = true
That allows for a merge strategy for a file, or set of files, as opposed to the -s
option for git merge
strategies, which doesn't require you to define a driver, but which would resolve the conflict for all files (not just for pom.xml
)
git merge -s ours