From fdd63482f6fa015dc031664254a5251d67334d43 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Fri, 13 Mar 2026 15:00:21 +0000 Subject: [PATCH] Fix deploy.sh: uncomment git pull so server gets latest code on deploy Previously the git fetch/reset block was commented out and the script only deployed whatever was already in the repo dir. Uncommented it and added git config core.fileMode false to prevent permission-drift merge conflicts. Co-Authored-By: Claude Sonnet 4.6 --- deploy.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/deploy.sh b/deploy.sh index 2bda518..291e5dd 100755 --- a/deploy.sh +++ b/deploy.sh @@ -70,21 +70,18 @@ else fi # ── Pull Latest Code ───────────────────────────────────────────── -# Run `git pull` manually before running this script. - -# log "Pulling latest code..." -# cd "${REPO_DIR}" -# -# if [ -d .git ]; then -# git fetch --all -# git reset --hard origin/$(git rev-parse --abbrev-ref HEAD) -# log "Code updated to $(git log --oneline -1)" -# else -# warn "Not a git repo — using existing files" -# fi +log "Pulling latest code..." cd "${REPO_DIR}" -log "Using current code at $(git log --oneline -1 2>/dev/null || echo 'unknown')" + +if [ -d .git ]; then + git config core.fileMode false + git fetch --all + git reset --hard origin/$(git rev-parse --abbrev-ref HEAD) + log "Code updated to $(git log --oneline -1)" +else + warn "Not a git repo — using existing files" +fi # ── Environment File ─────────────────────────────────────────────