Socket
Book a DemoInstallSign in
Socket

git-tails

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-tails

Get git tail hashes from your repository in reverse chronological order

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

git-tails

FAQs

Package last updated on 13 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts