mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 06:04:31 +08:00
13 lines
222 B
Python
13 lines
222 B
Python
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")
|