Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sthnaqvi/nodegitlib
A tool to play with git within node project
https://github.com/sthnaqvi/nodegitlib
Last synced: about 1 month ago
JSON representation
A tool to play with git within node project
- Host: GitHub
- URL: https://github.com/sthnaqvi/nodegitlib
- Owner: sthnaqvi
- License: mit
- Created: 2020-03-08T13:14:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T20:41:19.000Z (almost 2 years ago)
- Last Synced: 2024-11-21T01:43:32.646Z (about 1 month ago)
- Language: JavaScript
- Size: 1.45 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nodegitlib
A tool to play with git within node project
## Installation
```sh
$ npm i nodegitlib --save
```
or
```sh
$ yarn add nodegitlib
```## Usage
Returns:
- Boolean `false`: It is not a git repository
- String: The branch name```js
const git = require('nodegitlib');git.isGit(); // true or false of current working directory
git.isGit('any/git/repo'); // true or falsegit.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](https://github.com/sthnaqvi)