I am trying o grasp gitpython module,
hcommit = repo.head.commit tdiff = hcommit.diff(\'HEAD~1\')
but tdiff = hcommit.diff(\'HEAD^ H
tdiff = hcommit.diff(\'HEAD^ H
To get the contents of the diff:
import git repo = git.Repo("path/of/repo/") # define a new git object of the desired repo gitt = repo.git diff_st = gitt.diff("commitID_A", "commitID_B")