更新项目

This commit is contained in:
luojian 2025-07-08 11:09:50 +08:00
parent ce2ccfa802
commit e7d78f249d
1 changed files with 6 additions and 5 deletions

View File

@ -33,6 +33,7 @@ class ProjectInit(Task):
repo.git.fetch(remote_name)
if repo.active_branch.name != branch_name:
# 2. 创建本地分支并跟踪远程分支
remote_branch_ref = f"{remote_name}/{branch_name}"
local_branch = repo.create_head(branch_name, remote_branch_ref) # 创建本地分支指向远程