mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
If a merge, cherry-pick, revert or "git am" stops with conflicts, users often edit the files that git changed, for example to fix the build. If they then decide to give up and abort, git fails with "Entry 'file' not uptodate. Cannot merge." It keeps unstaged changes when aborting, but it can't reset the staged changes of a file underneath them. "git am --abort" even stops halfway, after it has reset the conflicted files. Git refuses to start any of these operations if there are staged changes, or if a file that it has to change has unstaged changes. So unstaged changes on top of staged ones were made after git stopped. Discard them before aborting, but ask the user first, listing the files. A rebase doesn't need this, because "git rebase --abort" discards all changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>