by thenduks · 15y ago · 0 comments
git shortlog -s | grep "My Name"
This shows how many commits you've made on a repo. Omit the grep to see everyone's counts.I like automation, so I looked for a different solution.
I'm still not sure what's the best way to go, but thanks for your comments!
Using my command I showed above I get the following output:
2791 Ryan Funduk
Still, yea, if you want data you could put on a calendar then I would instead suggest `git log` with `pretty-format` which you could then parse pretty easily.Docs: http://www.kernel.org/pub/software/scm/git/docs/git-log.html
Eg, here's a command that will output a csv with the commit sha, message, unix timestamp and committer name:
git log --pretty=format:'"%h", "%s", "%at", "%an"' | grep "Your Name"I still want to be able to pick out patterns in the data tho. Getting the data out is only half the battle, then you have to be able to pick out something interesting in it.
If you see my other comment here, I already wrote some scripts that pulled timestamps into iCal files and graphs.