Skip to content

michalbe/git-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-info by @michalbe

Get 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 }
});

// Sometimes the answer can be multiline
gi('authors', function(err, result) {
  console.log(result); // { authors: [array of all the authors from the project] }
});

API

Supported commands:

  • author - top author of the repo
  • authors - list of all the authors
  • authorDate - date of last commit
  • authorDateRelative - relative date of last commit
  • name - name of the repository
  • repository - address of the repo
  • branch - current branch
  • branches - all the branches in the repo
  • sha - sha of the last commit
  • shaShort - short form of the sha of the last commit
  • subject - message of the last commit

About

Get detailed data about current git repo from node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages