async function isGitRepo(execaOptions) {
  try {
    return (await execa("git", ["rev-parse", "--git-dir"], execaOptions)).exitCode === 0;
  } catch (error) {
    debug(error);
  }
}
Test if the current working directory is a Git repository.

@param {Object} [execaOpts] Options to pass to `execa`.

@return {Boolean} `true` if the current working directory is in a git repository, falsy otherwise.