There is VFS for git from Microsoft, that can solve problem more elegant way, I think: https://github.com/microsoft/scalar
They upstreamed almost everything. The last version of "scalar" was mostly just a configuration tool for sparse checkout "cones" which needed a bit of hand-holding, and that is easier to configure in git itself now, or so I hear.