is-git-dirty
v2.0.2
Published
Check if a repository has untracked or added files
Downloads
814,317
Maintainers
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