mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
refactor(update): replace git pull with fetch + reset for reliable sync
extract git utilities into scripts/git.sh module. this approach handles accidental local commits that would cause rebase conflicts during updates.
This commit is contained in:
@@ -749,7 +749,7 @@ backup_preserved_dirs() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# Restore preserved directories after git pull
|
||||
# Restore preserved directories after git reset
|
||||
# Usage: restore_preserved_dirs <backup_base_path>
|
||||
# Returns: 0 on success, 1 on failure
|
||||
restore_preserved_dirs() {
|
||||
@@ -784,7 +784,7 @@ restore_preserved_dirs() {
|
||||
fi
|
||||
|
||||
if [ -d "$backup_base/$dir" ]; then
|
||||
log_info "Restoring $dir/ after git pull..."
|
||||
log_info "Restoring $dir/ after git reset..."
|
||||
|
||||
# Remove the git-restored version
|
||||
if [ -d "$PROJECT_ROOT/$dir" ]; then
|
||||
|
||||
Reference in New Issue
Block a user