https://github.com/jpeer264/node-git-commit-info
Get the info of an specific commit hash
https://github.com/jpeer264/node-git-commit-info
commit git information is-git nodejs
Last synced: 3 months ago
JSON representation
Get the info of an specific commit hash
- Host: GitHub
- URL: https://github.com/jpeer264/node-git-commit-info
- Owner: JPeer264
- License: mit
- Created: 2017-05-19T09:47:09.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-06-08T05:07:43.000Z (about 2 years ago)
- Last Synced: 2024-11-01T13:08:19.320Z (8 months ago)
- Topics: commit, git, information, is-git, nodejs
- Language: TypeScript
- Size: 1.2 MB
- Stars: 7
- Watchers: 4
- Forks: 4
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# git-commit-info
Get all information about a specific commit.
[](https://travis-ci.com/JPeer264/node-git-commit-info)
[](https://ci.appveyor.com/project/JPeer264/node-git-commit-info/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)