From 5ab10d466d7aa8e584932b6eb6484a68c54a7c7b Mon Sep 17 00:00:00 2001 From: Mixer Date: Tue, 14 Apr 2026 08:29:14 +0900 Subject: [PATCH] Fix: remove state_merged.db before git pull to avoid conflicts --- sync.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sync.sh b/sync.sh index 24bb4ab..15cfe81 100755 --- a/sync.sh +++ b/sync.sh @@ -8,6 +8,11 @@ cd "$SYNC_DIR" echo "[$(date '+%H:%M:%S')] Sync from $HOSTNAME..." +# ── Step 0: Clean local state_merged.db to avoid git pull conflicts ────── +# The merged db is produced by this script, not tracked, and can conflict +# with remote when pulling. Remove it before fetch+merge. +rm -f "$SYNC_DIR/state_merged.db" + # ── Step 1: Export local state.db (via temp dir to avoid lock) ──────────── python3 << PYEOF import sqlite3, os, shutil, tempfile