Last active
February 23, 2021 03:51
-
-
Save burntcookie90/c12b786e44af0df74414286c35ee79d7 to your computer and use it in GitHub Desktop.
runs linguist on ever commit since a date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
for commit in $(git --no-pager log --reverse --after="2016-10-01T10:36:00-07:00" --pretty=format:%H) | |
do | |
echo $commit | |
git checkout $commit | |
#write linguist data to a file | |
echo "" >> ~/repo-linguist-report.txt | |
echo "commit: $commit" >> ~/repo-linguist-report.txt | |
github-linguist >> ~/repo-linguist-report.txt | |
#write commit dates to another file, because we're lazy | |
echo "commit: $commit" >> ~/repo-commit-dates.txt | |
git show -s --format=%ci $commit >> ~/repo-commit-dates.txt | |
done | |
A side note;
You need to first install github-linguist
gem on your OS:
For MacOs;
sudo gem install github-linguist
correct, this is dependant on https://github.com/github/linguist#installation
Thanks @burntcookie90
May I ask how to view such a chart for my project after executing this command? I executed it and it finished but I don't know what to do next.
@nuhkoca, sorry for the necro reply i totally missed your comment! We ended up just sticking the data in a google sheet and charting it there.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice quick idea, thanks :)