Write to file the number commits you have contributed to one or serveral repositories. Track and display that file to improve productivity.
-
Download or clone repository to directory
$(commit-tracker-directory)
. -
Add a cron job that runs the script
$ crontab -e
And assuming knowing the directory that contains the repositories that you wish to track $(directory-with-repositories-to-track)
, add a new cron job at the end of the file that would look something like this:
*/1 * * * * ~/Workstation/commit-tracker/script.sh -d ~/Workstation -n Alexandre\ Sobolevski > ~/Workstation/commit-tracker/.commitTracker.log 2>&1
- See total commits contributed since beginning of the day
cat $(commit-tracker-directory)/.commitTally.txt
- [RECOMMENDED] Use BitBar to display the total number of commits in the menu bar. By creating a script
commits.1m.sh
in the BitBar folder with the following content:
#!/bin/bash
echo $(cat /Users/alexandresobolevski/Workstation/.commitTally.txt | awk 'END {print $NF}') 'Commit(s)'
Display in the menu bar the number of commits contributed to a project Blog Post
MIT