git-tails

1.1.0 • Public • Published

NPM version Build Status Dependency Status Coverage Status

Get git tail hashes from your repository in reverse chronological order

It sucks when you could do git show HEAD but not git show TAIL. git-tails comes to the rescue!

Did you know that there could be more than one tails in your git repository?

Install

$ npm install --save git-tails

Usage

var gitTails = require('git-tails');
 
gitTails(function(err, data) {
  console.log(data);
  //=> ['0cd33254f2df29272323dca4f052be70d9659174']
});
 
gitTails.sync()
//=> ['0cd33254f2df29272323dca4f052be70d9659174']
$ npm install --global git-tails
$ git-tails
0cd33254f2df29272323dca4f052be70d9659174

To get the earliest tail you just need to do

gitTails(function(err, data) {
  console.log(data[data.length - 1]);
  //=> '0cd33254f2df29272323dca4f052be70d9659174'
});

If you know there is only one tails you could do

$ git show `git-tails`

Just like git show HEAD.

License

MIT © Steve Mao

/git-tails/

    Package Sidebar

    Install

    npm i git-tails

    Weekly Downloads

    22

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • stevemao