fix: configure git pull.rebase to prevent divergent branch errors

This commit is contained in:
Yury Kossakovsky
2025-12-22 09:22:42 -07:00
parent 8650c70992
commit d6cd2d44df
2 changed files with 9 additions and 0 deletions

View File

@@ -64,6 +64,11 @@ else
# Change to project root for git pull
cd "$PROJECT_ROOT" || { log_error "Failed to change directory to $PROJECT_ROOT"; exit 1; }
# Ensure git pull.rebase is configured (fallback for older installations)
if [ -z "$(git config --global pull.rebase)" ]; then
git config --global pull.rebase true
fi
# Backup user-customizable directories before git reset (uses PRESERVE_DIRS from utils.sh)
if ! BACKUP_PATH=$(backup_preserved_dirs); then
log_error "Backup failed. Aborting update to prevent data loss."