Has anyone implemented a git clone or interface library using nodejs? [closed]
I'm looking for an implementation of git which is accessible from nodejs - does such a beast exist?
Solution 1:
Looks like there are now several options for using git from node:
- gift: simple Node.js wrapper for the Git CLI with an API based on Grit (npm / github)
- node-git: a node.js git implementation modeled on grit (npm / github)
- nodegit: libgit2 asynchronous native bindings (npm / github)
- node-git: a thin wrapper around the command-line git command (github)
Solution 2:
Note sure if there's a git library for Node but you can also just execute a shell process directly, example:
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) }
exec("git status", puts);