A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/77942388/last-git-changes-on-a-given-file below:

python - Last git changes on a given file

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...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4