upvote
libgit2 exists. You could imagine communicating with some gitd over a pipe/socket but I don't know why that would be a good idea. Short of that you have to spawn processes.
reply
On Windows maybe it would be a COM server, using IPC built into the OS. The client sees it like a local function call.
reply