Package Exports
- is-git-dirty
- is-git-dirty/dest/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-git-dirty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-git-dirty
Checks synchronously if the git repository is clean. This assumes that no files are added, untracked or modified.
Installation
$ npm i is-git-dirty --save
or
$ yarn add is-git-dirty
Usage
Returns:
null
: Directory is not a git repositorytrue
: Files are added, untracked or modifiedfalse
: No files are added, untracked or modified. Git is clean
import isGitDirty from 'is-git-dirty';
isGitDirty(); // true or false of process.cwd()
isGitDirty('any/git/repo'); // true or false
LICENSE
MIT © Jan Peer Stöcklmair