async function isBranchUpToDate(repositoryUrl, branch, execaOptions) {
  return (
    (await getGitHead(execaOptions)) ===
    (await execa("git", ["ls-remote", "--heads", repositoryUrl, branch], execaOptions)).stdout.match(/^(?<ref>\w+)?/)[1]
  );
}
Verify the local branch is up to date with the remote one.

@param {String} repositoryUrl The remote repository URL.
@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.