/is-git-dirty-remote-too

Check if a repository has untracked, modified or added files

Primary LanguageJavaScriptMIT LicenseMIT

is-git-dirty-remote-too EDIT DOES NOT WORK

Checks synchronously if the git repository is clean and there are no unpulled changes on remote. This assumes that no files are added, untracked or modified.

Installation

$ npm i is-git-dirty-remote-too --save-dev

Usage

Returns:

  • true: Files are added, untracked or modified
  • false: No files are added, untracked or modified. Git is clean
import isGitDirtyRemoteToo from 'is-git-dirty-remote-too';

isGitDirtyRemoteToo(); // true or false of process.cwd()
isGitDirtyRemoteToo('any/git/repo'); // true or false
"scripts": {
  "pre-deploy": "is-git-dirty-remote-too",
}

LICENSE

MIT