@ong/git-info
v1.1.3
Published
Get the reop HEAD info.
Downloads
7
Readme
@ong/git-info
Get the git repo HEAD info.
Usage
npm install @ong/git-info
import gitInfo from '@ong/git-info'
const {
repo, // the repo to get info
status, // whether or not correctly get the info, true for success false for fail
message, // empty or error message
branch, // current branch
hash // commit hash code
} = gitInfo(hashLen/* hash length, default is 8*/, path/* repo path, default is current working dir */)