Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error npm init octoherd-script pushing files to initial PR #13

Closed
oscard0m opened this issue Jun 1, 2021 · 1 comment · Fixed by #14
Closed

Error npm init octoherd-script pushing files to initial PR #13

oscard0m opened this issue Jun 1, 2021 · 1 comment · Fixed by #14

Comments

@oscard0m
Copy link
Collaborator

oscard0m commented Jun 1, 2021

When executing npm init octoherd-script I get the following issue:

$ git add .github/workflows/release.yml
$ git commit -m 'ci(release): initial version'
$ git add .github/workflows/test.yml
$ git commit -m 'ci(test): initial version'
$ git push
Error: Command failed with exit code 1: git push
To github.com:oscard0m/octoherd-script-sync-repo-settings.git
 ! [rejected]        initial-version -> initial-version (fetch first)
error: failed to push some refs to 'github.com:oscard0m/octoherd-script-sync-repo-settings.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
    at makeError (/Users/XXXXX/.npm/_npx/7261/lib/node_modules/create-octoherd-script/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/XXXX/.npm/_npx/7261/lib/node_modules/create-octoherd-script/node_modules/execa/index.js:116:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async command (file:///Users/XXXX/.npm/_npx/7261/lib/node_modules/create-octoherd-script/lib/command.js:5:30)
    at async main (file:///Users/XXXX/.npm/_npx/7261/lib/node_modules/create-octoherd-script/cli.js:248:5) {
  shortMessage: 'Command failed with exit code 1: git push',
  command: 'git push',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'To github.com:oscard0m/octoherd-script-sync-repo-settings.git\n' +
    ' ! [rejected]        initial-version -> initial-version (fetch first)\n' +
    "error: failed to push some refs to 'github.com:oscard0m/octoherd-script-sync-repo-settings.git'\n" +
    'hint: Updates were rejected because the remote contains work that you do\n' +
    'hint: not have locally. This is usually caused by another repository pushing\n' +
    'hint: to the same ref. You may want to first integrate the remote changes\n' +
    "hint: (e.g., 'git pull ...') before pushing again.\n" +
    "hint: See the 'Note about fast-forwards' in 'git push --help' for details.",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

PR where this happened: https://github.com/oscard0m/octoherd-script-sync-repo-settings/pull/1/commits

octoherd-create-script has its own issue to recover when this error happens: octoherd/create-octoherd-script#39 but I think squash-commit-app should think about solutions for the user in this kind of scenarios:

  • 💡 Skip on certain titles, PR labels?
  • I would not like to rely on manually adding the app to repos and be out of the box running in all the repos under my user.
@gr2m
Copy link
Collaborator

gr2m commented Jun 1, 2021

😞

I think this would be resolved by #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants