You can use:
repo = git.Repo('c:/SomeRepo') repo.git.reset('--hard')
Or, if you need to reset to a specific branch:
repo.git.reset('--hard','origin/master')
Or in my case, if you just want to update the repo to the source / wizard (warning, this will immediately change your current changes):
# blast any current changes repo.git.reset('--hard')
blented
source share