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.
$ npm i is-git-dirty-remote-too --save-dev
Returns:
true
: Files are added, untracked or modifiedfalse
: 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",
}
MIT