fix(deploy): error: The following untracked working tree files would be overwritten by checkout

This commit is contained in:
proletarius101 2024-04-06 16:45:03 +08:00
parent 6ddf241713
commit d9984dbeea
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -602,6 +602,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
# Switch to the initial branch and unstage all files
repo.head.reference = initial_branch_ref
repo.head.reset(index=True, working_tree=False)
repo.delete_head(repo.branches[branch_name])
if progress:
progressbar.done()