Last git changes on a given file

42 views Asked by At

Using the gitpython library, I'm trying access the date of the last changes on a given file. So far I only found out how to:

import git
# get a handle on a repo object for the current directory
repo=git.Repo()
# get a handle on the tree object of the repo on the current branch
tree=repo.active_branch.commit.tree
# get a handle of the blob object of a given file
blob=tree['path/to/a/file.py']

After that I got stuck...

0

There are 0 answers