From fedb806fc8ee47fbdaba214eecd44a33dbf5c5da Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Wed, 13 May 2026 14:47:39 +0700 Subject: [PATCH] fix(workflow): use -X theirs to resolve history.jsonl rebase conflicts --- .github/workflows/update.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index f021ec1..74cd3c2 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -46,10 +46,11 @@ jobs: exit 0 fi git commit -m "chore: daily ranking refresh" - # rebase + retry guards against the race where two runs commit near-simultaneously + # rebase + retry guards against the race where two runs commit near-simultaneously. + # -X theirs makes our run's data/history.jsonl line win conflicts (our snapshot is the freshest). for attempt in 1 2 3; do if git push; then exit 0; fi echo "push attempt $attempt rejected, rebasing on origin/main" - git pull --rebase origin main + git pull --rebase -X theirs origin main done exit 1