Skip to content

Commit 8960322

Browse files
committed
auto sync #3
1 parent 847a83f commit 8960322

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/sync.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ jobs:
7777
echo "Remote branch ${{ inputs.target_sync_branch }} exists."
7878
# 创建一个临时分支来fetch远程分支的内容
7979
git fetch upstream ${{ inputs.upstream_sync_branch }}:temp_${{ inputs.upstream_sync_branch }}
80-
git checkout ${{ inputs.target_sync_branch }}
81-
# 合并,使用传入解决合并冲突
82-
git merge --strategy-option theirs temp_${{ inputs.upstream_sync_branch }}
80+
git branch -D ${{ inputs.target_sync_branch }} # 强制删除本地分支
81+
git branch ${{ inputs.target_sync_branch }} temp_${{ inputs.upstream_sync_branch }} # 创建新分支
8382
# 强制删除临时分支,没必要
8483
# git branch -D temp_${{ inputs.upstream_sync_branch }}
8584
# 推送新分支到远程仓库

0 commit comments

Comments
 (0)