Checks synchronously if files are added in a git repository
$ npm i is-git-added --save
or
$ yarn add is-git-added
false
: Nothing is added/in the HEAD, or it is no git repositorytrue
: Changes are ready to commit. Files are added.
const isGitAdded = require('is-git-added');
isGitAdded(); // true or false of process.cwd()
isGitAdded('any/git/repo'); // true or false
MIT © Jan Peer Stöcklmair