async function isRefExists(ref, execaOptions) {
  try {
    return (await execa("git", ["rev-parse", "--verify", ref], execaOptions)).exitCode === 0;
  } catch (error) {
    debug(error);
  }
}
Verify if the `ref` exits

@param {String} ref The reference to verify.
@param {Object} [execaOpts] Options to pass to `execa`.

@return {Boolean} `true` if the reference exists, falsy otherwise.