fix(ci): auto-fix checkout加--force,避免tarball untracked文件冲突 #643

Merged
xiaoxia merged 1 commits from fix/ci-autofix-checkout-force into develop 2026-07-20 14:28:42 +08:00
+1 -1
View File
@@ -62,7 +62,7 @@ def ensure_git_repo(api_url, repo, token, pr_number):
# 强制checkout到源分支(覆盖tarball内容)
# tarball是merge后的commit,源分支才是我们要修改并推送的目标
print("切换到源分支...")
run(f"git checkout -B {head_branch} FETCH_HEAD")
run(f"git checkout -B --force {head_branch} FETCH_HEAD")
result = run("git status --porcelain")
if result.stdout.strip():