gitbutler
gitbutler copied to clipboard
Git command exited with non-zero exit code
Version
0.14.15
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
After creating new PR I got git error:
PR was successfully created and merged.
How to reproduce (Optional)
- Push "Submit for review"
- Fill new PR
- See error popup
Expected behavior (Optional)
- Push "Submit for review"
- Fill new PR
- Rebase and merge without errors.
Relevant log output (Optional)
2025-04-08T12:31:21.623295Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:493: close time.busy=20.8ms time.idle=31.9µs project_id=414c02e1-fbdc-4021-b686-35b93458c777 filter=None
2025-04-08T12:31:29.040401Z ERROR push_stack: crates\gitbutler-tauri\src\stack.rs:113: error=Error(backend error: git command exited with non-zero exit code 1: ["push", "--quiet", "--no-verify", "origin", "b083f9e1a5b64f612cc34414708d957ea741ecb6:refs/heads/File-dialog"]
STDOUT:
STDERR:
To https://github.com/JoyHak/QuickSwitch
! [rejected] b083f9e1a5b64f612cc34414708d957ea741ecb6 -> File-dialog (non-fast-forward)
error: failed to push some refs to 'https://github.com/JoyHak/QuickSwitch'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you want to integrate the remote changes, use 'git pull'
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Caused by:
git command exited with non-zero exit code 1: ["push", "--quiet", "--no-verify", "origin", "b083f9e1a5b64f612cc34414708d957ea741ecb6:refs/heads/File-dialog"]
STDOUT:
STDERR:
To https://github.com/JoyHak/QuickSwitch
! [rejected] b083f9e1a5b64f612cc34414708d957ea741ecb6 -> File-dialog (non-fast-forward)
error: failed to push some refs to 'https://github.com/JoyHak/QuickSwitch'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you want to integrate the remote changes, use 'git pull'
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.) project_id=414c02e1-fbdc-4021-b686-35b93458c777 stack_id=c9fca597-582d-48c1-9710-d867794b7d9c with_force=false
2025-04-08T12:31:29.040598Z INFO push_stack: crates\gitbutler-tauri\src\stack.rs:113: close time.busy=11.6s time.idle=46.1µs project_id=414c02e1-fbdc-4021-b686-35b93458c777 stack_id=c9fca597-582d-48c1-9710-d867794b7d9c with_force=false
2025-04-08T12:31:29.054730Z INFO stack_branches: crates\gitbutler-tauri\src\workspace.rs:44: new project_id=414c02e1-fbdc-4021-b686-35b93458c777 stack_id="c9fca597-582d-48c1-9710-d867794b7d9c"
Thanks a lot for reporting!
I think this may be due to GitButler not realizing that a force-push is needed, so the subsequent push will fail.