The definitive checking library for git
npm install @nodegit/is

The definitive checking library for git
``sh`
$ npm i @nodegit/is
`js
const is = require('@nodegit/is')
// Test if the current working directory is a git repo
// or inside a git repo
is.git()
// Which is equivalent to
is.git(process.cwd())
// Test if the current working directory is the root of a git repo
is.gitRoot()
`
- dir string=process.cwd() the directory to be tested. If not specified, the current working directory will be used
Returns boolean true if cwd is the root of a git repo or inside a git repo
- dir
Returns boolean true if cwd` is the root of a git repo