I need to get the paths to the files that were changed in the last commit using GitPython. I managed to do it this way:
import os
from git import Repo
repo = Repo(os.path.dirname(sys.argv[0]))
commit = list(repo.iter_commits(max_count=1))[0]
files = commit.stats.files
for filepath in files:
print(filepath)
But now I want to filter out those files that were deleted or renamed, and I'm a bit stuck with it. I would be grateful for any help, maybe someone has such an experience.