You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
Option 3: Not a fan at all of this one: Retry with push force? Pull before each push?
honestly probably that's what I'd do right now. These commits are meant to be atomic, everything else should take a back seat and wait until its done. I'd just always use --force 🤷🏼
When executing
npm init octoherd-script
I get the following issue:PR where this happened: https://github.com/oscard0m/octoherd-script-sync-repo-settings/pull/1/commits
This is because of
squash-commit-app[bot]
is doing an empty commit in the middle. I think this script should recover from this error in some way:On the other hand,
squash-commit-app
issue has been created: squash-commit-app/squash-commit-app#13The text was updated successfully, but these errors were encountered: