Update auto-sync scripts to use git reset --hard

This commit is contained in:
2025-12-28 10:17:18 +11:00
parent 929477c1f7
commit 039e126d9a
2 changed files with 6 additions and 5 deletions

View File

@@ -39,8 +39,9 @@ fi
log "🔄 Changes detected! Pulling updates..."
# Pull changes
git pull origin main 2>&1 | tee -a "$LOG_FILE"
# Force update (overwrite local changes)
log "⚠️ Resetting local changes to match remote..."
git reset --hard origin/main 2>&1 | tee -a "$LOG_FILE"
# Install/update dependencies if package.json changed
if git diff --name-only $LOCAL $REMOTE | grep -q "package.json"; then