mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-10-23 07:42:05 +00:00
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
This commit is contained in:
8
setup.sh
8
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
|
||||
|
||||
|
Reference in New Issue
Block a user