async function gitRepo(withRemote, branch = "master") {
  let { cwd, repositoryUrl } = await initGit(withRemote);
  if (withRemote) {
    await initBareRepo(repositoryUrl, branch);
    cwd = await gitShallowClone(repositoryUrl, branch);
  } else {
    await gitCheckout(branch, true, { cwd });
  }

  await execa("git", ["config", "commit.gpgsign", false], { cwd });

  return { cwd, repositoryUrl };
}
Create a temporary git repository.
If `withRemote` is `true`, creates a shallow clone. Change the current working directory to the clone root.
If `withRemote` is `false`, just change the current working directory to the repository root.


@param {Boolean} withRemote `true` to create a shallow clone of a bare repository.
@param {String} [branch='master'] The branch to initialize.
@return {Promise<Object>} The path of the clone if `withRemote` is `true`, the path of the repository otherwise.