Skip to content

Commit 178476a

Browse files
committed
fix: use explicit origin/branch to avoid ambiguous checkout
1 parent e8e12b4 commit 178476a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/sync-upstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Sync main branch
3333
run: |
34-
git checkout main
34+
git checkout origin/main -B main
3535
git merge upstream/main --no-edit || {
3636
echo "Merge conflict detected on main branch"
3737
git merge --abort
@@ -47,7 +47,7 @@ jobs:
4747
4848
- name: Sync dev branch
4949
run: |
50-
git checkout dev
50+
git checkout origin/dev -B dev
5151
git merge upstream/dev --no-edit || {
5252
echo "Merge conflict detected on dev branch"
5353
git merge --abort

0 commit comments

Comments
 (0)