From 3863d641faaa98547067fdc6215bed30fda5a861 Mon Sep 17 00:00:00 2001 From: Muhammad Ibrahim Date: Mon, 13 Oct 2025 21:15:04 +0100 Subject: [PATCH] Fix git update conflicts in setup.sh --update - Add git clean -fd to remove untracked files before pull - Add git reset --hard HEAD to ensure clean state - Prevents merge conflicts from untracked files during updates - Ensures smooth updates from any version to any version --- setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.sh b/setup.sh index c108701..c6178d7 100755 --- a/setup.sh +++ b/setup.sh @@ -1769,6 +1769,14 @@ update_installation() { print_info "Pulling latest code from branch: $DEPLOYMENT_BRANCH" cd "$instance_dir" + # Clean up any untracked files that might conflict with incoming changes + print_info "Cleaning up untracked files to prevent merge conflicts..." + git clean -fd + + # Reset any local changes to ensure clean state + print_info "Resetting local changes to ensure clean state..." + git reset --hard HEAD + # Fetch latest changes git fetch origin