Code Monkey home page Code Monkey logo

node-gits's Introduction

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

node-gits's People

Contributors

eladb avatar gilad61 avatar sergioramos avatar yosefd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-gits's Issues

More detailed documentation

I would love some more detailed documentation. For example:

gits.git(dir, argsArray, callback) - just runs git command line

Okay, dir is obvious, but what goes in the argsArray. What does the callback return? etc etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.