1.1.0 • Published 8 years ago
git-info v1.1.0
git-info by @michalbe
Get detailed data about current git repo.
How to use:
npm install git-infothen:
var gi = require('git-info');
// First argument of the function can be a String
gi('name', function(err, result) {
console.log(result); // { name: name-of-the-repo }
});
// Or Array of Strings
gi(['name', 'author'], function(err, result) {
console.log(result); // { name: name-of-the-repo,
// author: author of the repo }
});
// Smetimes the answer can be multiline
gi('authors', function(err, result) {
console.log(result); // { authors: [array of all the authors from the projest] }
});API
Supported commands:
author- top author of the repoauthors- list of all the authorsauthorDate- date of last commitauthorDateRelative- date of last commitname- name of the repositoryrepository- address of the repobranch- current branchbranches- all the branches in the reposha- the sha of the last commitshaShort- the sha of the last commit but in the short formsubject- the message of the last commit
To Do
- more commands? like
commitShaorcommitMsg?