With gitattributes you can configure custom diff driver and custom merge driver for a specific file type.
For example:
- diff-tools include some tools that work as diff driver, but it is a bit undocumented in regards to what those diff drivers do, and for what files they should be used
- nbdime tool for better diffing and merging of Jupyter notebooks can work as either diff driver, or as graphical diff interface (as difftool)
- ...