code: async function isGitRepo(execaOpts) {
    try {
      return (await execa('git', ['rev-parse', '--git-dir'], execaOpts)).code === 0;
    } catch (error) {
      debug(error);
    }
  }
docs: 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.