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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user