You can set a custom merge driver in /etc/gitlab/gitlab.rb according to GitLab documentation.
gitaly['configuration'] = {
# ...
git: {
# ...
config: [
# ...
{ key: "merge.ours.name", value: "Keep OUR version" },
{ key: "merge.ours.driver", value: "true" },
],
},
}