mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 14:23:08 +00:00
fix: configure git pull.rebase to prevent divergent branch errors
This commit is contained in:
@@ -38,6 +38,10 @@ apt install -y \
|
||||
build-essential ca-certificates gnupg lsb-release openssl \
|
||||
apt-transport-https python3-dotenv python3-yaml
|
||||
|
||||
# Configure git to use rebase on pull (prevents merge commits during updates)
|
||||
log_info "Configuring git pull strategy..."
|
||||
git config --global pull.rebase true
|
||||
|
||||
# Configuring Firewall (UFW)
|
||||
log_subheader "Firewall (UFW)"
|
||||
log_info "Configuring firewall..."
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user