1.0.2 • Published 4 years ago

nodegitlib v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

nodegitlib

A tool to play with git within node project

Installation

$ npm i nodegitlib --save

or

$ yarn add nodegitlib

Usage

Returns:

  • Boolean false: It is not a git repository
  • String: The branch name
const git = require('nodegitlib');

git.isGit(); // true or false of current working directory
git.isGit('any/git/repo'); // true or false

git.currentBranch(); // false or git current branch name of current working directory
git.currentBranch('any/git/repo'); // false or git current branch name

LICENSE

MIT © Sayed Tauseef Naqvi