-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
Lazygit enters a permanent rebase state and becomes non-functional, even though Git itself reports that no rebase is in progress.
Attempting to abort, skip, or continue the rebase from lazygit results in the following error: `Warning: Could not read '.git/rebase-merge/head-name': No such file or directory
`Restarting lazygit only opens it up in the same state.
Deleting the following manually immediately resolved the issue:
rm -r .git/rebase-merge
rm .git/ORIG_HEAD
To Reproduce
I have not been able to reliably reproduce this issue.
It happened while interacting with the latest commit (using e or s in lazygit). Subsequent attempts using the same steps did not trigger the issue, and the rebase could be aborted normally.
Expected behavior
Consistent and graceful error handling or ability to abort rebase.
Screenshots
Version info:
$ lazygit --version
commit=, build date=, build source=nix, version=0.57.0, os=linux, arch=amd64, git version=2.52.0
$ git --version
git version 2.52.0
Additional context
At the time of the issue, the .git/rebase-merge/ directory existed but contained only a single file. The expected head-name file was missing.
Initially I suspected this might have been triggered by a permission error while editing a file during the rebase. However, after further testing (including intentionally creating directories without write permissions), I was unable to reproduce the issue, so this may not be directly related to permissions.
I am running on NixOS, and this occurred shortly after checking for updates.