1.0.0-rc.3 • Published 2 years ago
git-log v1.0.0-rc.3
Node.js Git Log
Read Git commit history from Node.js.
Installation
npm install --save git-logUsage
import gitLog from 'git-log'
const commits = await gitLog()
console.log(commits[0].title)
//=> Upgrade to Node.js 10.x
console.log(commits[0].date)
//=> 2019-10-07T20:47:10.000Z
console.log(commits[0].body)
//=> This patch change the Node.js verison to...
console.log(commits[0].hash)
//=> e79b76217e03ba5b4e87182d07f855d9ff3e6d95API
gitLog([options])
options(object, optional)merges(boolean, optional) - Wether or not to include commits with more than one parent.range(string, optional) - Include only commits in the specified revision range. When norangeis specified, it defaults to'HEAD'(i.e. the whole history leading to the current commit).repo(string, optional) - Path to the repository to read the log from. When norepois specified, the current working dirtectory will be used.path(string | string[], optional) - Path to a file or directory to limit results to specific changes. When nopathis specified, the entire history of the project is returned.
- returns
Promise<object[]>- List of commitssubject(string) - Subject of the commitbody(string) - Body of the commithash(string) - Hash of the commitdate(Date) - Committer date of the commit
1.0.0-rc.3
2 years ago
1.0.0-rc.2
2 years ago
1.0.0-rc.1
3 years ago
1.0.0-beta.1
6 years ago
0.0.1
12 years ago
0.0.0
12 years ago