Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.27 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.27 KB

commit-tracker

Write to file the number commits you have contributed to one or serveral repositories. Track and display that file to improve productivity.

Usage

  • 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)'

Examples

Display in the menu bar the number of commits contributed to a project Blog Post

License

MIT