Git works great with text-based code-cad. My personal favourite flavor is build123d, which is based on cadquery.
Since OpenSCAD uses basically source code format, it already does.
I'm more interested in tracking and versioning edits to KiCAD schematics, for instance.
I think you are describing something similar to Perforce Versic [1]. I use this at work to diff schematic or layout. The ugly thing is: it's perforce.. I wish there was an open source alternative.
KiCAD’s storage format is s-expressions, so it works OK with git (better than binary file formats). However I have not tried to merge concurrent edits by multiple people; I suspect if there is any conflict you are basically out of luck.