async-git
馃懢 Retrieve data from current git repository
Last updated 4 months ago by omrilotan .
MITRepositoryBugsOriginal npmTarballpackage.json
$ cnpm install async-git 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.13.0                                ...           latest (4 months ago)

20 Versions

  • 1.13.0                                ...           4 months ago
  • 1.12.0                                ...           6 months ago
  • 1.11.0                                ...           7 months ago
  • 1.10.1                                ...           8 months ago
  • 1.10.0                                ...           8 months ago
  • 1.9.0                                ...           8 months ago
  • 1.8.0                                ...           8 months ago
  • 1.7.0                                ...           8 months ago
  • 1.6.1                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 1.5.1                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.0                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-alpha.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (2)
Dev Dependencies (11)

Copyright 2014 - 2016 漏 taobao.org |