@michalbe
git-info byGet detailed data about current git repo.
How to use:
npm install git-info
then:
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 authorsname
- name of the repositoryrepository
- address of the repobranch
- current branchbranches
- all the branches in the repo
To Do
- more commands? like
commitSha
orcommitMsg
?