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
{{ message }}
Repository navigation
Continue rebase drops the commit a rebase stopped on when replay fails without a conflict #88
When a rebase stops because replaying a commit fails without a conflict, the rebase stays in progress. One example is an untracked file in the way of a file that the commit adds.
After you move the file away, Continue rebase reports "Rebase complete", but the commit the rebase stopped on is gone. A later commit that depended on it then has nothing left to apply and is dropped too. Nothing warns about this.
Expected: like git rebase --continue, Continue picks the stopped commit again and the branch keeps all its commits.
Likely cause (from reading libgit2 1.9 rebase.c): when git_rebase_next fails in its checkout step, it never writes the merged index for that commit, because git_indexwriter_commit runs after git_checkout_index. rebase_continue in apps/desktop/src-tauri/src/core/branch.rs then calls rebase.commit() first. It gets GIT_EAPPLIED because the index still equals HEAD, treats the commit as already applied and moves on.
Misleading error: when the rebase stops, the app shows 1 uncommitted change would be overwritten by merge; class=Merge (22); code=Conflict (-13). The obstacle is an untracked file, so the message doesn't make clear what to move.
Steps to reproduce
Give master a commit theirs that topic doesn't have.
On branch topic, make three commits: first (adds first.txt), add later (adds later.txt) and remove later (deletes later.txt).
Create an untracked later.txt in the working tree.
Rebase topic onto master. The rebase stops with the error above and the toolbar shows a rebase in progress.
Delete later.txt and choose Continue rebase.
The history is now first, theirs, base. Both add later and remove later are gone.
The same steps with git rebase master and git rebase --continue (git 2.56) end with remove later, add later, first, theirs, base.
I reproduced this through the engine functions the UI calls (branch::rebase, then rebase_continue), not by clicking through the app.
Fixed in 0.27.0. You had the cause right: libgit2 moves on to the commit before it writes the index, so Continue took it for already applied. Continue now applies the stopped commit again, and the stop message names the file that's in the way instead of the libgit2 code. Your exact steps are a test now, thanks for tracing it.
Activity
fix(rebase): apply the commit a rebase stopped on when it continues (#88
cheat2001 commentedon Nov 9, 2026
Fixed in 0.27.0. You had the cause right: libgit2 moves on to the commit before it writes the index, so Continue took it for already applied. Continue now applies the stopped commit again, and the stop message names the file that's in the way instead of the libgit2 code. Your exact steps are a test now, thanks for tracing it.