From d7a7798d83a564c2ea2d830c5f90b6debaa4335a Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Wed, 13 May 2026 14:21:00 -0400 Subject: [PATCH] fix: disambiguate sync-from-public branch checkout After 'git remote add public' fetches the same branches that already exist on origin, 'git checkout ' becomes ambiguous and fails with: fatal: 'preview' matched multiple (2) remote tracking branches Both sync jobs now use 'git checkout -B origin/' which explicitly resets the local branch from origin's tracking ref, removing the ambiguity and combining the previous 'checkout + reset --hard' into one step. Last 4 scheduled runs of 'Sync from Public Repo' all failed with this error; the workflow has been silently broken since the public/origin branches collided. --- .github/workflows/sync-from-public.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync-from-public.yml b/.github/workflows/sync-from-public.yml index e38a4d625..127257392 100644 --- a/.github/workflows/sync-from-public.yml +++ b/.github/workflows/sync-from-public.yml @@ -37,8 +37,7 @@ jobs: - name: Sync main with public/main run: | - git checkout main - git reset --hard origin/main + git checkout -B main origin/main # Check if public/main is already merged if git merge-base --is-ancestor public/main HEAD; then @@ -137,8 +136,7 @@ jobs: - name: Sync preview with public/preview run: | - git checkout preview - git reset --hard origin/preview + git checkout -B preview origin/preview # Check if public/preview is already merged if git merge-base --is-ancestor public/preview HEAD; then