V
V
Vladislav2022-01-10 17:32:44
Python
Vladislav, 2022-01-10 17:32:44

How to get information from Git about metadata changes over a certain period of time using GitPython?

It is necessary to extract information about metadata changes from the project to git (there is a local copy), namely:
Number of commits on the file (code, method) for 2 weeks on a certain branch

The code
import os
import time
import git
import datetime
Changedata = {}
MY_PATH = os.chdir(r'C:\Users\vsi\int\sfdevops_metrics\.project\na_gold')
repo = git.Repo(MY_PATH)
commits = list(repo.iter_commits("Staging", datetime=))


From the code, only the initialization of the turnip and the makings of time sorting

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question