Live data from Hacker News

Git-Stats – A local GitHub-like contributions calendar

github.com

1–10 of 39 posts

Re: Git-Stats – A local GitHub-like contributions calendar

#3
post #2

I'm only half-awake, so maybe I'm missing something obvious. Why is the README talking about a git commit hook? Why not just take the data from the log?

It seems like for performance reasons, git-stats wants to update the calendar on commit instead of generating it on the fly. git-cal[0] just does this on the fly and works reasonably fast for me. The UI looks very comparable.

[0] https://github.com/k4rthik/git-cal

Re: Git-Stats – A local GitHub-like contributions calendar

#4
Cool! I was actually just looking for a tool like this a couple of weeks ago. I stumbled across git-cal[1], which only works on one repository at a time, but it doesn't require you to import your commits first like this one does[2].

Here's my output from both tools, generated from the repo I spend most of my time in at work: http://i.imgur.com/chrmeP6.png.

[1] https://github.com/k4rthik/git-cal

[2] https://github.com/IonicaBizau/git-stats#importing-and-delet...

EDIT: Just noticed that the "contributions" counts differ.

    peterjmag@peters-imac ~/checkouts/rg/community (git::master) 
    $ git rev-list HEAD --author="Peter" --since="1 year ago" --count
    1205
But git-stats shows 1292. What does it count as a contribution?

Re: Git-Stats – A local GitHub-like contributions calendar

#5
post #2

I'm only half-awake, so maybe I'm missing something obvious. Why is the README talking about a git commit hook? Why not just take the data from the log?

Looks like that he parses the log with the hook and then stores the json output in ~/.git-stats (git-stats --record), my guess is that he then generates the calendar only from that data so that he doesn't have to parse the whole history all over again. I'm a bit worried about the size of that file though...

Re: Git-Stats – A local GitHub-like contributions calendar

#8
post #6

Why do people care about this? I never understood why Github features things like "longest commit streak" so prominently.

I like the commit streak statistic because, when I attempt to maintain a long streak, I get into the habit of committing something - even something small - once a day. Once I've made even the slightest change, I'm more likely to keep working. I find that it's a good motivator.

Re: Git-Stats – A local GitHub-like contributions calendar

#10
Awesome stuff, I really like this for the following reason:

While I do push data to github for various projects, I actually take part in 3-4 active, self-hosted redmine projects that would never be counted in the github graph. Same for a seldom-updated bitbucket project.

Post reply on HN