add online ver

This commit is contained in:
hongyi.ren
2024-09-14 17:41:30 +08:00
parent 67c448bc2e
commit 25dc66c1de
113 changed files with 148765 additions and 0 deletions
@@ -0,0 +1,12 @@
import git
commit_hash = "a361cc1"
repo = git.Repo('.')
if repo.is_dirty():
repo.git.stash()
repo.git.update_ref("refs/remotes/origin/main", commit_hash)
repo.remotes.origin.fetch()
repo.git.pull("origin", "main")