Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gits

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gits

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

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
216
increased by5300%
Maintainers
3
Weekly downloads
 
Created
Source

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

Build Status

Apart from simply exposing git(dir, args, callback, [options]) 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, [options]) - 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"

Options to git():

  • options.env - hash of environment variables to pass to git. Default is process.env.
  • options.logger - alternative to console.

License

MIT

FAQs

Package last updated on 29 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc