We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 847a83f commit 8960322Copy full SHA for 8960322
.github/workflows/sync.yml
@@ -77,9 +77,8 @@ jobs:
77
echo "Remote branch ${{ inputs.target_sync_branch }} exists."
78
# 创建一个临时分支来fetch远程分支的内容
79
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 }}
+ git branch -D ${{ inputs.target_sync_branch }} # 强制删除本地分支
+ git branch ${{ inputs.target_sync_branch }} temp_${{ inputs.upstream_sync_branch }} # 创建新分支
83
# 强制删除临时分支,没必要
84
# git branch -D temp_${{ inputs.upstream_sync_branch }}
85
# 推送新分支到远程仓库
0 commit comments