2.1.0 • Published 1 year ago
nodegitlib v2.1.0
nodegitlib
A tool to play with git within node project
Installation
$ npm i nodegitlib --saveor
$ yarn add nodegitlibUsage
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 nameLICENSE
MIT © Sayed Tauseef Naqvi