I think this is what emscripten is for: You have some _great_ code and want to port it to the browser platform. But I'm afraid Git relies heavily on the "Posix runtime" that is not supported by emscripten, since emscripten does not try to emulate an os.