gits
v0.1.8
Published
A node.js git library with some cool features like synchronizing all the branches from a git remote to a local subdir
Downloads
36
Readme
gits - Yet another friendly git module for node.js with some goodies (and async)
Apart from simply exposing git(dir, args, callback)
there are a couple of nice utilities.
Installation
npm install gitsync
Usage
var gits = require('gits');
API:
gits.pull(dir, callback)
- runs git reset + git pull in a directorygits.sync(origin, branch, dir, callbacl)
- clones/pulls origin/branch into dirgits.bsync(origin, target, branches, prefix, callback)
- clones multiple branches (or all if branches is null) from origin into subdirectories under target dir. 'prefix' is prepended to subdirectory namesgits.bsyncAll(origin, target, prefix, callback)
- clones all branches from origin into targetgits.currentBranch(dir, callback)
- returns the current branch of a directorygits.git(dir, argsArray, callback)
- just runs git command linegits.remotes(dir, callback)
- returns a hash with the remotes in the repo
License
MIT