fix: use checkout -B for reinstall to support new/switched branches
Fixes "pathspec did not match" error when switching to a branch that doesn't yet have a local tracking ref on the target machine. Also adds CD ripping tools install and output/cd directory creation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -425,7 +425,7 @@ if [[ -d "$INSTALL_DIR/.git" ]]; then
|
|||||||
# (z.B. ripster-Serviceuser nach erstem Install)
|
# (z.B. ripster-Serviceuser nach erstem Install)
|
||||||
git config --global --add safe.directory "$INSTALL_DIR" 2>/dev/null || true
|
git config --global --add safe.directory "$INSTALL_DIR" 2>/dev/null || true
|
||||||
git -C "$INSTALL_DIR" fetch --quiet origin
|
git -C "$INSTALL_DIR" fetch --quiet origin
|
||||||
git -C "$INSTALL_DIR" checkout --quiet "$GIT_BRANCH"
|
git -C "$INSTALL_DIR" checkout --quiet -B "$GIT_BRANCH" "origin/$GIT_BRANCH"
|
||||||
git -C "$INSTALL_DIR" reset --hard "origin/$GIT_BRANCH"
|
git -C "$INSTALL_DIR" reset --hard "origin/$GIT_BRANCH"
|
||||||
ok "Repository aktualisiert auf Branch '$GIT_BRANCH'"
|
ok "Repository aktualisiert auf Branch '$GIT_BRANCH'"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user