1.1.0 • Published 7 years ago

git-current-commit v1.1.0

Weekly downloads
85
License
MIT
Repository
github
Last release
7 years ago

git-current-commit

Get the current local git commit.

Usage

const getCommit = require('git-current-commit')

getCommit(function (err, commit) {
  if (err) throw err
  console.log(commit) // => '21ed11701a068b88b3890578a1c8a420972927a4'
})

getCommit.sync() // => '21ed11701a068b88b3890578a1c8a420972927a4'
getCommit.promise() // => '21ed11701a068b88b3890578a1c8a420972927a4'

Installation

$ npm install git-current-commit

API

getCommit(dir, cb)

getCommit.sync(dir)

getCommit.promise(dir)

License

MIT