I’m the product manager for Developer Experience at Squiz. One of the projects we are working on at the moment is a template deployment service that will do something very similar to what you described. We are building out the breadth of the Asset Management API (https://docs.squiz.net/matrix/version/latest/api/asset-management-api/index.html) to cover enough asset types, and creating a service that will export and serialise your Matrix implementation as a local set of folders, json files, and files. You will be able to edit the HTML of your parse file or paint layout in your local IDE, VS Code or whatever - including keywords or mysource tags etc. You would check that code into GIT, and run a CLI command to deploy it to Matrix to update the assets. It wont limit you from editing these assets in Matrix as well, you’ll just have to export the template first and merge it with your git copy of the code.
It’s at a reasonably early stage although the core solution works, and we have a subset of relevant assets built out, but it may be a little while before we can make the service available to customers.
If you want to know more I’d be happy to catch up with you.