From 871e39bba24ff4d77b0ed0f7c9276b6360d3a47c Mon Sep 17 00:00:00 2001 From: mboehmlaender Date: Thu, 12 Mar 2026 08:09:11 +0000 Subject: [PATCH] fix: reset hard before branch switch to discard stale local changes Partial writes from a failed install leave files as "local changes", blocking the checkout. Reset to HEAD first so the switch always works. Co-Authored-By: Claude Sonnet 4.6 --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 52cc445..ad52bf0 100755 --- a/install.sh +++ b/install.sh @@ -433,6 +433,7 @@ if [[ -d "$INSTALL_DIR/.git" ]]; then git config --global --add safe.directory "$INSTALL_DIR" 2>/dev/null || true git -C "$INSTALL_DIR" remote set-branches origin '*' git -C "$INSTALL_DIR" fetch --quiet origin + git -C "$INSTALL_DIR" reset --hard HEAD git -C "$INSTALL_DIR" checkout --quiet -B "$GIT_BRANCH" "origin/$GIT_BRANCH" git -C "$INSTALL_DIR" reset --hard "origin/$GIT_BRANCH" ok "Repository aktualisiert auf Branch '$GIT_BRANCH'"