I suspect you may already be aware, but if not then here's a related project https://github.com/creationix/js-git.
Lest you misunderstand, I'm not saying you should stop development, I just thought it might be of interest!
Or, in a different language, https://github.com/jelmer/dulwich