From f8617ec1e5645d7d791fc65afda296e0ea72f6fb Mon Sep 17 00:00:00 2001 From: PTah Date: Tue, 16 Jun 2026 11:40:49 +1000 Subject: [PATCH] fix(scripts): Push-Mirror ignores untracked files Co-authored-by: Cursor --- scripts/Push-Mirror.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Push-Mirror.ps1 b/scripts/Push-Mirror.ps1 index 4602a60..378edcb 100644 --- a/scripts/Push-Mirror.ps1 +++ b/scripts/Push-Mirror.ps1 @@ -21,8 +21,8 @@ if ($LASTEXITCODE -ne 0) { throw "remote not configured: $remote" } -if ((git status --porcelain)) { - throw 'working tree not clean; commit or stash first' +if ((git status --porcelain -uno)) { + throw 'working tree has uncommitted tracked changes; commit or stash first' } $before = (git rev-parse HEAD).Trim() @@ -36,6 +36,6 @@ if (-not (git status --porcelain)) { git add -A git commit -m "chore(docs): sync repository URLs for ${Target} mirror" -git push $remote main +git push --force-with-lease $remote main git reset --hard $before Write-Output "pushed $remote with ${Target} URLs; local main reset to $before"