Rider, with Unity integration, automatically runs UnityYAMLMerge on all YAML files when resolving merge conflicts. This may be preferrable to using a standalone solution that has no awareness of the larger project. If you're looking for a more generic solution that works for many diff tools check out mbaker3/UnityYAMLMerge.
Add the following to the .git/config
of your repo. This will configure Rider to launch when you execute git mergetool
or for any git clients that respect the config file.
[merge]
tool = unityyamlmerge
[mergetool "unityyamlmerge"]
trustExitCode = false
cmd = /Applications/Rider.app/Contents/MacOS/rider merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"