From 94614bf774babc1099c4e7442ee262523164b8f7 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Wed, 24 Jun 2026 04:27:21 -0700 Subject: [PATCH] fix: git stash before deploy, no pop (discard board changes) - just deploy: stash local board changes before git pull - install.sh: configure git alias 'pull-clean' for manual use - Board-side changes from test edits are discarded on deploy --- install.sh | 2 ++ justfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f274ebc..424851c 100755 --- a/install.sh +++ b/install.sh @@ -29,5 +29,7 @@ done # Install git hooks: point to repo's .githooks so post-merge auto-restarts services git config core.hooksPath "$REPO/.githooks" +# Add pull-clean alias: stash local changes, pull fresh, discard stashed +git config alias.pull-clean '!git stash && git pull' echo "[OK] Services installed and enabled" diff --git a/justfile b/justfile index 195b6c0..0265aa3 100644 --- a/justfile +++ b/justfile @@ -101,7 +101,7 @@ install: deploy: @git push origin HEAD 2>&1 @ssh {{SSH_OPTS}} "{{BOARD_USER}}@{{BOARD_HOST}}" "\ - cd {{REPO_DIR}} && git pull && \ + cd {{REPO_DIR}} && git stash && git pull && \ git config core.hooksPath .githooks && \ chmod +x scripts/*.py scripts/*.sh 2>/dev/null; \ echo '{{BOARD_PASS}}' | sudo -S systemctl daemon-reload && \