current-commit

0.0.0 • Public • Published

current-commit experimental

Retrieve the currently checked out commit in a git repository.

Simple and standalone – no forking out to a git process.

Usage

NPM

current(directory, done(err, commit))

Given a git repository at directory, call done(err, commit) with the resulting commit value. If your repository doesn't have any commits yet, you'll get false in return instead.

commit = current(directory)

Same as above, except synchronous.

License

MIT. See LICENSE.md for details.

Package Sidebar

Install

npm i current-commit

Weekly Downloads

4

Version

0.0.0

License

MIT

Last publish

Collaborators

  • hughsk