A RetroSearch Logo

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

Search Query:

Showing content from http://stackoverflow.com/questions/78157433/get-all-the-commits-message-of-a-file-using-gitpython below:

Get all the commits message of a file using GitPython

I have the following piece of code to get the list of commit summaries of a specific file:

from git import Repo
repo_working_dir = '<valid directory of the repo>'

repo = Repo(repo_working_dir)

update_file = '<full path of the file whose commit summaries I want to read>'
for commit in list(repo.iter_commits(repo.active_branch,paths=update_file)):
    print(commit.summary)

The above code runs but returns no output. Please let me know where I am going wrong.


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