1.1.4 • Published 3 years ago

git-utils-node v1.1.4

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

git-utils-node

Get current git commit hash, commit message, latest tag, branch and so on.

Install

npm install git-utils-node --save

Example

const git = require('git-utils-node')

console.log(git.shortCommitHash()) // ef89de1

console.log(git.commitHash()) // ef89de12ce1aa5cd74866bf875e015eef42906f6

console.log(git.currentBranch()) // master

console.log(git.latestTagName()) // v3.0.1

console.log(git.userName()) // tenglei

console.log(git.conflicts()) // show conflict files

console.log(git.changedFiles()) // show changed files of last commit

console.log(git.remoteBranches()) // ['dev', 'master', 'test'] (show remote branches)

console.log(git.localBranches()) // ['dev', 'master'] (show local branches)

console.log(git.localMissingBranches()) // ['test'] (compare local branches with remote)

You can also run all these examples via: npm run example

1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago