AST diff and merge algorithms allow to resolve conflicts which cannot be resolved by usual git. For example changes in the same row or moving blocks of code into other places or variables renames. It may be useful to store not text diffs, but AST ones. Of course with fallback to raw text or binary when the lang is unknown.
https://github.com/koczkatamas/onelang - is an abstract ast for all langs with specifying languages in yaml and transpiling the code on them to each other
https://github.com/GumTreeDiff/gumtree - ast diff tool