I am trying to write a function using python to determine modified files in a git repository. I saw there are couple of packages: Gittle git-python GitPython How can I get a list of pathlib.Path instances of modified files? Python version in use: 3.8 Edit: In order to check modified files in GitPython I have tried the following: diff = repo.git.diff('HEAD~1..HEAD', name_only=True) but this gives me the files that are different, comparing the latest commit with the one before, instead of comparing the latest commit with unstaged changes. Continue reading...