fix(git-sync): force git rm --cached to handle MM index state
Build and Deploy Verso / deploy (push) Successful in 11m12s
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:
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)
|
||||
|
||||
Reference in New Issue
Block a user