daquanzhou
merge github repos and lfs track ckpt/path/safetensors/pt
613c9ab
raw
history blame
222 Bytes
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")