is-git-dirty
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

is-git-dirty

Build Status Build status Coverage Status

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 repository
  • true: Files are added, untracked or modified
  • false: 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

Package Sidebar

Install

npm i is-git-dirty

Weekly Downloads

167,041

Version

2.0.2

License

MIT

Unpacked Size

7.63 kB

Total Files

12

Last publish

Collaborators

  • jpeer