Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 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](https://github.com/sthnaqvi)