1.13.3 • Published 2 years ago
async-git v1.13.3
async-git
👾 Retrieve data from current git repository
* Getter properties are async (getters) more on async properties
const git = require('async-git');
`${await git.author} committed ${await git.message}` // Omri committed Some changes
Getters
Property | Type | Description | Example |
---|---|---|---|
author | string | Author name of the last commit | await git.author |
body | string | Most recent commit message body | await git.body |
branch | string | Current branch name | await git.branch |
changed | string[] | List of files changed in last commit | await git.changed |
comitter | string | Comitter name of the last commit | await git.comitter |
date | Date | Date of the last change | await git.date |
email | string | Author email of the last commit | await git.email |
message | string | Most recent commit full message (subject and body) | await git.message |
name | string | Project name | await git.name |
origin | string | Remote origin URL | await git.origin |
owner | string | Remote repository owner | await git.owner |
sha | string | Unique identifier of the last commit | await git.sha |
short | string | 7 Character Unique identifier of the last commit | await git.short |
staged | string[] | List of staged files | await git.staged |
subject | string | Most recent commit subject | await git.subject |
tags | string[] | List of tags | await git.tags |
unadded | string[] | List of files that would be added or removed by 'git add' | await git.unadded |
unstaged | string[] | List of unstaged files | await git.unstaged |
untracked | string[] | List of untracked files | await git.untracked |
version | string | Get git version (semver) | await git.version |
Functions
modified
Get the last modified date of a file
await modified('./index.js')
Argument | Return value |
---|---|
{string} Path to file | {Date} Last modified date |
reset
Reset current HEAD to the specified destination
await git.reset(1) // reset number of commit back
await git.reset('f5db755') // reset to specific SHA ID
Argument | Return value |
---|---|
{string\|number} State ID | {void} nothing |
tag
Create a tag using the last commit message
await git.tag('1.2.3')
Argument | Return value |
---|---|
{string} Version | {void} nothing |
1.13.3
2 years ago
1.13.2
3 years ago
1.13.1
3 years ago
1.13.0
4 years ago
1.12.0
4 years ago
1.11.0
4 years ago
1.10.1
4 years ago
1.10.0
4 years ago
1.9.0
4 years ago
1.8.0
5 years ago
1.7.0
5 years ago
1.6.1
5 years ago
1.6.0
5 years ago
1.5.1
5 years ago
1.5.0
5 years ago
1.4.0
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
6 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.0
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago