# git-commit-info

> Get the info of an specific commit hash

Latest version **2.0.2** (published 2023-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-commit-info
pnpm add git-commit-info
yarn add git-commit-info
bun add git-commit-info
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2023-06-08 |
| First published | 2012-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 28.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jan Peer Stöcklmair |
| Maintainers | jpeer |
| Keywords | is, git, repository, repo, is-git, needs, push |

## Links

- npm: https://www.npmjs.com/package/git-commit-info
- Repository: https://github.com/JPeer264/node-git-commit-info
- Homepage: https://github.com/JPeer264/node-git-commit-info#readme
- Issues: https://github.com/JPeer264/node-git-commit-info/issues
- npm.io page: https://npm.io/package/git-commit-info

## Dependencies (3)

- [execa](https://npm.io/package/execa.md) ^4.0.3
- [path-is-absolute](https://npm.io/package/path-is-absolute.md) ^1.0.1
- [is-git-repository](https://npm.io/package/is-git-repository.md) ^1.1.1

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2023-06-08
- 2.0.1 — 2022-01-12
- 2.0.0 — 2020-07-12
- 1.1.0 — 2020-07-02
- 1.0.0 — 2017-06-11
- 0.2.0 — 2012-04-14
- 0.1.0 — 2012-04-14
- 0.0.2 — 2012-04-14

## README

# git-commit-info

Get all information about a specific commit.

[![Build Status](https://travis-ci.com/JPeer264/node-git-commit-info.svg?branch=master)](https://travis-ci.com/JPeer264/node-git-commit-info)
[![Build status](https://ci.appveyor.com/api/projects/status/itogtq2ri9e2i24y/branch/master?svg=true)](https://ci.appveyor.com/project/JPeer264/node-git-commit-info/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/JPeer264/node-git-commit-info/badge.svg?branch=master)](https://coveralls.io/github/JPeer264/node-git-commit-info?branch=master)

## Installation

```sh
$ npm i git-commit-info --save
```
or
```sh
$ yarn add git-commit-info
```

## Usage

**Available parameters:**
- `cwd`: Specify the path. Default: `process.cwd()`
- `commit`: The hash of the commit. Default: latest

```js
const gitCommitInfo = require('git-commit-info');

// information of process.cwd() and the latest commit
gitCommitInfo();

// information of the latest commit in ./my_repo
gitCommitInfo({
  cwd: './my_repo',
});

// information of the specified commit in process.cwd()
gitCommitInfo({
  commit: '82442c2405804d7aa44e7bedbc0b93bb17707626', // any hash
});

// information of the specified commit in ./my_repo
gitCommitInfo({
  cwd: './my_repo',
  commit: '82442c2405804d7aa44e7bedbc0b93bb17707626', // any hash
});
```

## LICENSE

MIT © [Jan Peer Stöcklmair](https://www.jpeer.at)

---
_Source: https://npm.io/package/git-commit-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
