From 5b714873f3d8a37b41bd92df34d5b5299682c12b Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 21 Jul 2026 13:42:20 +0000 Subject: [PATCH] fix(git-sync): force git rm --cached to handle MM index state After reset --mixed FETCH_HEAD, staged content can differ from both HEAD and the working tree when new file content has been written. Without -f, git rm --cached refuses to remove such entries. Co-Authored-By: Claude Sonnet 4.6 --- services/web/app/src/Features/GitSync/GitSyncHandler.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/src/Features/GitSync/GitSyncHandler.mjs b/services/web/app/src/Features/GitSync/GitSyncHandler.mjs index 03f8828dea..19340f91e9 100644 --- a/services/web/app/src/Features/GitSync/GitSyncHandler.mjs +++ b/services/web/app/src/Features/GitSync/GitSyncHandler.mjs @@ -259,7 +259,7 @@ async function pushToRemote( // skipped by git add -A when the directory mtime hasn't changed since the last checkout. if (pushFiles) { if (subPath) { - await spawnGit(['rm', '-r', '--cached', '--ignore-unmatch', '--', subPath], repoDir) + await spawnGit(['rm', '-rf', '--cached', '--ignore-unmatch', '--', subPath], repoDir) await spawnGit(['add', '--', subPath], repoDir) } else { await spawnGit(['add', '-A'], repoDir)