gitty

A Node.js wrapper for the Git CLI

LGPL-3.0 47 个版本
安装
npm install gitty
yarn add gitty
pnpm add gitty
bun add gitty
README

Gitty

Gitty is a Node.js wrapper for Git. It's syntax resembles the Git command line syntax, executes common commands, and parses the output into operable objects.

Complete documentation is available here.

Installation

Prerequisites

$ npm install gitty

Testing

Run the the unit and integration tests with:

$ npm test

Usage

var git    = require('gitty');

// identifying the repo and using defaults
var myRepo = git('/path/to/repo');

// explicitly passing the path to the git client
var myRepo2 = git('/path/to/repo2', '/not-in-path/bin/git');

// specifying an options object (note all properties are optional)
var myRepo3 = git('/path/to/repo3', {
  gitpath: '/not-in-path/bin/git',                          // optional
  largeOperations: ['log', 'ls-files', 'status', 'commit'], // optional
  largeOperationsMaxBuffer: 1024 * 6000                     // optional
});

Now you can call this instance of Repository's methods. For example, to execute git log for myRepo, you would do:

myRepo.log(function(err, log) {
	if (err) return console.log('Error:', err);
	// ...
});

Authenticated Repositories

Gitty no longer supports username/password authentication over SSH. You should be using SSH keys for that.

myRepo.push('origin', 'master', function(err, succ) {
	if (err) return console.log(err);
	// ...
});

Author

Gitty was written by Emery Rose Hall (emery@deadcanaries.org)
Licensed under LGPLv3 license

版本列表
3.7.2 2020-03-03
3.7.1 2020-01-07
3.7.0 2019-01-16
3.6.0 2017-02-19
3.5.0 2016-10-10
3.4.0 2016-10-10
3.3.6 2016-06-20
3.3.5 2016-04-19
3.3.4 2016-03-01
3.3.3 2016-01-15
3.3.2 2016-01-04
3.3.1 2015-12-14
3.3.0 2015-11-30
3.2.3 2015-05-24
3.2.2 2015-05-04
3.2.1 2015-03-27
3.2.0 2015-02-25
3.1.5 2015-02-23
3.1.4 2015-02-19
3.1.3 2015-01-22
3.1.2 2015-01-22
3.1.1 2014-09-16
3.1.0 2014-09-08
3.0.1 2014-09-08
3.0.0 2014-09-07
2.1.7 2014-09-05
2.1.6 2014-08-26
2.1.5 2014-08-20
2.1.4 2014-08-17
2.1.3 2014-08-17
2.1.2 2014-07-01
2.1.0 2014-04-09
2.0.0 2013-12-12
1.2.6 2013-11-29
1.2.5 2013-07-16
1.2.4 2013-03-25
1.2.3 2013-03-14
1.2.2 2013-03-06
1.2.1 2013-03-05
1.2.0 2013-02-21
1.1.6 2013-02-02
1.1.5 2013-01-12
1.1.4 2012-12-02
1.1.3 2012-10-27
1.1.2 2012-10-18
1.1.0 2012-10-18
0.0.1 2012-08-09