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

Command line tools throw GitPushError with message Working directory has staged changes #3303

Open
nellh opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels

Comments

@nellh
Copy link
Contributor

nellh commented Jan 27, 2025

What went wrong?

It's possible for the local working copy to fail due to staged files.

Transferring annexed files 100.00%                                  87.5s 28/28
Pushing changes...
error: Uncaught (in worker "") (in promise) GitPushError: One or more branches were not updated:
  - refs/heads/main: Working directory has staged changes
    at _push (file:///.cache/deno/npm/registry.npmjs.org/isomorphic-git/1.27.1/index.js:12621:11)
    at Object.runMicrotasks (ext:core/01_core.js:685:26)
    at processTicksAndRejections (ext:deno_node/_next_tick.ts:59:10)
    at runNextTicks (ext:deno_node/_next_tick.ts:76:3)
    at eventLoopTick (ext:core/01_core.js:184:21)
    at async Object.push (file:///.cache/deno/npm/registry.npmjs.org/isomorphic-git/1.27.1/index.js:12701:12)
    at async push (https://jsr.io/@openneuro/cli/4.30.2/src/worker/git.ts:426:3)
    at async PromiseQueue.processQueue (https://jsr.io/@openneuro/cli/4.30.2/src/worker/queue.ts:17:24)
error: Uncaught (in promise) null etected 404 changes.

Expected behavior

This case should reset the local copy and retry this step instead of throwing this exception.

How to reproduce

Interrupt during commit creation while uploading with the command line tool.

Desktop

  • OS:
  • Browser:
  • Version:

Phone

  • Device:
  • OS:
  • Browser:
  • Version:

Additional information

No response

@nellh nellh added the bug label Jan 27, 2025
@nellh nellh self-assigned this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant