Socket
Book a DemoInstallSign in
Socket

git-current-commit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-current-commit

Get the current local git commit

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
1
-94.44%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 02 May 2017

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