1.1.0 • Published 8 years ago

git-tails v1.1.0

Weekly downloads
51
License
MIT
Repository
github
Last release
8 years ago

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

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

9 years ago

0.0.0

9 years ago