Skip to content

A node.js git library with some cool features like synchronizing all the branches from a git remote to a local subdir

License

Notifications You must be signed in to change notification settings

anodejs/node-gits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gits - Yet another friendly git module for node.js with some goodies (and async)

Build Status

Apart from simply exposing git(dir, args, callback, [logger]) there are a couple of nice utilities.

Installation

npm install gits

Usage

var gits = require('gits');

API:

  • gits.align(dir, callback) - runs git reset, recovery commands and git pull in a directory
  • gits.sync(origin, branch, dir, callback) - clones/pulls origin/branch into dir
  • gits.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 names
  • gits.bsyncAll(origin, target, prefix, callback) - clones all branches from origin into target
  • gits.currentBranch(dir, callback) - returns the current branch of a directory
  • gits.git(dir, argsArray, callback, [logger]) - just runs git command line
  • gits.remotes(dir, callback) - returns a hash with the remotes in the repo
  • gits.log(dir, opts, callback) - lists all the commits under a directory
  • gits.prune(dir, callback) - runs "git remote prune origin" for a directory
  • gits.pruneAll(basrDir, callback) - runs "git remote prune origin" against all subdirectories of "baseDir"

License

MIT

About

A node.js git library with some cool features like synchronizing all the branches from a git remote to a local subdir

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •