Lists the last commit affecting a file across multiple repositories
Script written in answer of [https://stackoverflow.com/questions/55496873/git-find-last-time-a-file-was-modified-across-multiple-repos]
Python3.6 or above is needed, along with the requests
package (included in
requirements.txt).
To install the requirements, you need to run:
pip install -r requirements.txt
Edit repos.txt
to define the file you want to log and the list of repos you
want to go through. The format is as follow:
- Path of the file, relative to the repository in the first line
- Each repository on the following lines
Example:
README.md
padawin/dotfiles
padawin/site
padawin/floodit-clone
Each line of repos.txt
must be terminated with a Unix end of line (\n
).
Then, run the script:
python3.6 log.py
The script will first output the erroring lines, then each commit line for each repo, sorted from the latest to the oldest.
The commits are sorted by author date by default. If you want them sorted by
committer date, call the script with committer
as argument:
python3.6 log.py committer