Skip to content

Commit 9503239

Browse files
authored
Merge pull request #1235 from aws/fix/sync-from-public-ambiguous-preview
fix: disambiguate sync-from-public branch checkout
2 parents ce00f57 + d7a7798 commit 9503239

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/sync-from-public.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ jobs:
3737
3838
- name: Sync main with public/main
3939
run: |
40-
git checkout main
41-
git reset --hard origin/main
40+
git checkout -B main origin/main
4241
4342
# Check if public/main is already merged
4443
if git merge-base --is-ancestor public/main HEAD; then
@@ -137,8 +136,7 @@ jobs:
137136
138137
- name: Sync preview with public/preview
139138
run: |
140-
git checkout preview
141-
git reset --hard origin/preview
139+
git checkout -B preview origin/preview
142140
143141
# Check if public/preview is already merged
144142
if git merge-base --is-ancestor public/preview HEAD; then

0 commit comments

Comments
 (0)