Thin wrapper around the git binary.
This library provides a very simple wrapper around the git binary.
Install the module with:
npm install git-exec
The majority of the interaction involves an exec() method which is involved on a instances of the library. This method is relatively stupid in that we do not try to parse the output or validate commands invoked.
However, we do take care to provide a means to both init / clone git repositories and we set the working directory correctly such that further git commands execute in the correct context.
var Git = require'git-exec';Gitclonea-repogit 'dir'// NOTE the callback is given a reference to the git repositoryrepoexec'checkout' '-t origin/dev'// ... callback to execute after branch checkout;;
var Git = require'git-exec';var repo = './path/to/repo';repoexec'pull' null// ... callback to execute after git pull;
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Copyright (c) 2012 Alex J Burke Licensed under the MIT license.