code: async function isBranchUpToDate(branch, execaOpts) {
    const remoteHead = await execa.stdout('git', ['ls-remote', '--heads', 'origin', branch], execaOpts);
    try {
      return await isRefInHistory(remoteHead.match(/^(\w+)?/)[1], execaOpts);
    } catch (error) {
      debug(error);
    }
  }
docs: Verify the local branch is up to date with the remote one.
  
  @param {String} branch The repository branch for which to verify status.
  @param {Object} [execaOpts] Options to pass to `execa`.
  
  @return {Boolean} `true` is the HEAD of the current local branch is the same as the HEAD of the remote branch, falsy otherwise.