1.13.3 • Published 2 years ago

async-git v1.13.3

Weekly downloads
346
License
Unlicense
Repository
github
Last release
2 years ago

async-git npm.io

👾 Retrieve data from current git repository

npm.io npm.io

* 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

PropertyTypeDescriptionExample
authorstringAuthor name of the last commitawait git.author
bodystringMost recent commit message bodyawait git.body
branchstringCurrent branch nameawait git.branch
changedstring[]List of files changed in last commitawait git.changed
comitterstringComitter name of the last commitawait git.comitter
dateDateDate of the last changeawait git.date
emailstringAuthor email of the last commitawait git.email
messagestringMost recent commit full message (subject and body)await git.message
namestringProject nameawait git.name
originstringRemote origin URLawait git.origin
ownerstringRemote repository ownerawait git.owner
shastringUnique identifier of the last commitawait git.sha
shortstring7 Character Unique identifier of the last commitawait git.short
stagedstring[]List of staged filesawait git.staged
subjectstringMost recent commit subjectawait git.subject
tagsstring[]List of tagsawait git.tags
unaddedstring[]List of files that would be added or removed by 'git add'await git.unadded
unstagedstring[]List of unstaged filesawait git.unstaged
untrackedstring[]List of untracked filesawait git.untracked
versionstringGet git version (semver)await git.version

Functions

modified

Get the last modified date of a file

await modified('./index.js')
ArgumentReturn 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
ArgumentReturn value
{string\|number} State ID{void} nothing

tag

Create a tag using the last commit message

await git.tag('1.2.3')
ArgumentReturn 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