fix(update): discard local changes before pull on production

Prevents merge conflicts when files were manually edited on the server.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-04-01 09:55:24 +00:00
parent e4237fc0f7
commit 9d824fd5f9

View File

@@ -56,6 +56,11 @@ if (-not $Silent) {
$commits | ForEach-Object { Write-Host " $_" -ForegroundColor DarkGray }
}
# Discard local changes (productia nu trebuie editata manual)
Log "==> Discard local changes..." "Cyan"
git checkout -- . 2>&1 | Out-Null
git clean -fd 2>&1 | Out-Null
# Git pull
Log "==> Git pull..." "Cyan"
$pullOutput = & git -c credential.helper="" pull $fetchUrl 2>&1