In order to set a default strategy for a file(s) in git merge you need to:

Enable the ours merge driver

  • for current repository
git config merge.ours.driver true
  • globally
git config --global merge.ours.driver true

Tell git to use the merge strategy for a file

echo "solutionfolder/file.xml merge=ours" >> .git/info/attributes

As a result the next pull with conflicts will automagically use ours version.

Just remember that the file will not longer be marked as merge conflict.

inspiration