From 10154dfd4fdf8ada2e2f99a37c00249a3db0c458 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 11 Feb 2026 18:16:31 -0800 Subject: [PATCH] respect gitignore in toes status --- src/cli/commands/sync.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cli/commands/sync.ts b/src/cli/commands/sync.ts index 9281dc9..1a739ab 100644 --- a/src/cli/commands/sync.ts +++ b/src/cli/commands/sync.ts @@ -158,10 +158,11 @@ export async function pushApp(options: { quiet?: boolean } = {}) { } } - // Files to delete (exist on server but not locally) + // Files to delete (exist on server but not locally, respecting gitignore) + const gitignore = loadGitignore(process.cwd()) const toDelete: string[] = [] for (const file of remoteFiles) { - if (!localFiles.has(file)) { + if (!localFiles.has(file) && !gitignore.shouldExclude(file)) { toDelete.push(file) } } @@ -1008,10 +1009,11 @@ async function getManifestDiff(appName: string): Promise { } } - // Files only in remote + // Files only in remote (filtered by local gitignore) + const gitignore = loadGitignore(process.cwd()) const remoteOnly: string[] = [] for (const file of remoteFiles) { - if (!localFiles.has(file)) { + if (!localFiles.has(file) && !gitignore.shouldExclude(file)) { remoteOnly.push(file) } }