I want to essentially revert changes in my master branch. I am able to find my history of commits by doing:
import git
repo = git.Repo('repos/my-repo')
commits = repo.iter_commits('master',max_count=10)
but I am unsure as to how to point the head to, lets say, a commit where the message contains "reset to me". I am aware of repo.git.reset('--hard')
, but I don't know how to properly use it. Thank you