https://github.com/hustcc/the-git-commit
:octocat: Nano nodejs module to get information of any git commit.
https://github.com/hustcc/the-git-commit
commit commit-info git git-commit the-git-commit
Last synced: 14 days ago
JSON representation
:octocat: Nano nodejs module to get information of any git commit.
- Host: GitHub
- URL: https://github.com/hustcc/the-git-commit
- Owner: hustcc
- License: mit
- Created: 2018-01-29T12:49:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T02:00:25.000Z (about 7 years ago)
- Last Synced: 2025-04-03T17:38:35.308Z (19 days ago)
- Topics: commit, commit-info, git, git-commit, the-git-commit
- Language: JavaScript
- Homepage: https://github.com/hustcc/the-git-commit
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# the-git-commit
> Nano nodejs module to get information of any git commit.
[](https://www.npmjs.com/package/the-git-commit) [](https://travis-ci.org/hustcc/the-git-commit) [](https://coveralls.io/github/hustcc/the-git-commit)
## Usage
```js
var TGM = require('the-git-commit');// lasest commit of current dir
new TGM().info();// lasest commit of `the-git-commit`
new TGM('/home/hustcc/the-git-commit').info();// the commit of current dir
new TGM().info('a63e1b4');// the commit of `the-git-commit`
new TGM('/home/hustcc/the-git-commit').info('a63e1b488ac24759276a2de414122e7bca4351be');
```Then get:
```js
{
hash: 'a41d55c100ae3e47a4781b7215cc2b5578fb59de',
short: 'a41d55c',
merge: ['54df71f', 'f8d50c8'],
author: 'hustcc',
email: '[email protected]',
date: 'Mon Dec 18 20:26:34 2017 +0800',
message: 'Merge branch \'release_20171218\' of fixed-1'
}```
## LICENSE
[MIT](https://github.com/hustcc).