diff --git a/apps/server/src/routes/worktree/routes/discard-changes.ts b/apps/server/src/routes/worktree/routes/discard-changes.ts index a0933149..7bf1a4ec 100644 --- a/apps/server/src/routes/worktree/routes/discard-changes.ts +++ b/apps/server/src/routes/worktree/routes/discard-changes.ts @@ -128,7 +128,7 @@ export function createDiscardChangesHandler() { stagedFiles.push(file.path); } // Check for working tree changes (worktree status Y): handles MM, AM, MD, etc. - if (workTreeStatus === 'M' || workTreeStatus === 'D' || workTreeStatus === 'A') { + if (workTreeStatus !== ' ' && workTreeStatus !== '?') { trackedModified.push(file.path); } }