Dr.Lt.Data
1 year ago
2 changed files with 8 additions and 5 deletions
@ -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") |
||||
|
Loading…
Reference in new issue