fix: update-fix.py

This commit is contained in:
Dr.Lt.Data
2023-07-26 00:43:36 +09:00
parent d5336c0299
commit e828281869
2 changed files with 8 additions and 5 deletions

View File

@ -1,9 +1,12 @@
import git
repo_path = "."
repo = git.Repo(repo_path)
commit_hash = "a361cc1"
repo = git.Repo('.')
if repo.is_dirty():
repo.git.stash()
repo.git.pull(rebase=True)
repo.git.update_ref("refs/remotes/origin/main", commit_hash)
repo.remotes.origin.fetch()
repo.git.pull("origin", "main")