fix(git-sync): force git rm --cached to handle MM index state
Build and Deploy Verso / deploy (push) Successful in 11m12s

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 <noreply@anthropic.com>
This commit is contained in:
claude
2026-07-21 13:42:20 +00:00
co-authored by Claude Sonnet 4.6
parent eb74c4fced
commit 5b714873f3
@@ -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)