fix(deploy): stash untracked/modified runtime assets before git pull in sync-vps-repos.sh

This commit is contained in:
Hermes Agent committed 2026-12-02 13:48:15 +00:00
1 parent 643454fbae
commit a70b8614f1
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -145,6 +145,7 @@ if [[ "${DO_PULL}" -eq 1 ]]; then
fi
fi
echo "[1/5] Updating ${REPOS_ROOT}/${repo} (${remote_name}/${branch}) with autostash rebase..."
git -C "${REPOS_ROOT}/${repo}" stash -u || true
prev_head="$(git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -C "${REPOS_ROOT}/${repo}" rev-parse HEAD)"
if [[ "${#GIT_PULL_PREFIX[@]}" -gt 0 ]]; then
run_checked "git fetch ${repo}" "${GIT_PULL_PREFIX[@]}" git ${GIT_SSH_FLAGS[@]+"${GIT_SSH_FLAGS[@]}"} -c "safe.directory=${REPOS_ROOT}/${repo}" -C "${REPOS_ROOT}/${repo}" fetch --force "${remote_name}" "${branch}" --tags