function pushOriginalContents()

in scripts/create.js [150:165]


function pushOriginalContents() {
  logger.trace('Setting up duplicate repo...');
  shell.cd('repo');
  // If we can't find the repo, clone it
  if (shell.cd(repository).code !== 0) {
    logger.debug("Can't find source repo locally. Cloning it...");
    shell.exec(`git clone ${originalUrl} ${repository}`);
    logger.debug('Finished cloning.');
    shell.cd(repository);
  }
  // Set the remote to the newly created repo
  shell.exec(`git pull origin ${defaultBranch}`);
  shell.exec(`git remote add ${newRepoName} ${newRepoUrl}`);
  shell.exec(`git push -u ${newRepoName} ${defaultBranch}`);
  logger.info('Duplicated original repo');
}