I want to get a table or csv (and eventually visualize it) about every file in git repository and every date when files were changed.
Expected output:
The number is how many commits contain that file per day
Date1 file1 12
Date1 file2 4
Date2 file1 6
Probably I should go and iterate trough all the commits and get somehow the modified files from every commit. Would you help me please?
RESEARCH
For iterating trough commits I found this => Git: want to iterate through all commits on branch, and list files in each commit
Getting the commit info
git diff --name-only SHA1 SHA2
How to get the date of a commit?
git show $commit
(Here I need all the files which were modified and the commit date)Figure out how to output this as a csv file.
Probably this is out of the scope here because the question is for Git. If someone wants to help is welcome.
PROGRESS:
for commit in $(git rev-list master)
do
# Get the author date
git log -1 ${commit} --pretty="%ad" --date=short
# get the files changes
git diff --name-only ${commit}^!
done | sort | uniq -c | sort -rn