Live data from Hacker News

Git-Stats – A local GitHub-like contributions calendar

github.com

21–30 of 39 posts

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

#23

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.co…

Does one exclude merge commits while the other includes them?

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

#25

I wish only that it weren't node…

I find it funny that I was down-voted so for this. I haven't maligned the project at all; in fact, I think it's incredibly cool, I'm just not a huge fan of node.

I downvoted you because negative nonconstructive comments may as well not be posted. They provide no tangible benefit to anyone who participates in the discussion.

If you have a compelling reason as to why this project would be better done in another language then it would be prudent to include this reason in your original post. If all you're going off is personal preference then it may be best to keep this to yourself.

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

#26
post #7

Doesn't work for me on Windows. Keep getting a blank calendar: That is it has dates and all but no commits.

You have to import your commits first: https://github.com/IonicaBizau/git-stats#importing-and-delet...

Still doesn't work (for me, osx)

  user@host ~/tmp # npm install -g git-stats
  /usr/local/bin/git-stats -> /usr/local/lib/node_modules/git-stats/bin/git-stats
  git-stats@1.1.0 /usr/local/lib/node_modules/git-stats                                                                                                                                                       ├── ul@1.1.0
  ├── ansi-parser@1.4.0                                                                                                                                                                                       ├── cli-box@2.1.1 (ansi-parser@1.3.0)
  ├── moment@2.9.0                                                                                                                                                                                            ├── git-stats-colors@1.0.0 (couleurs@3.0.0)
  └── bug-killer@1.0.0 (couleurs@1.1.0)                                                                                                                                                                       user@host ~/tmp # npm install -g git-stats-importer                                                                                                                                                         /usr/local/bin/git-stats-importer -> /usr/local/lib/node_modules/git-stats-importer/bin/git-stats-importer
  git-stats-importer@1.3.0 /usr/local/lib/node_modules/git-stats-importer                                                                                                                                     ├── gry@1.0.0
  ├── async@0.9.0                                                                                                                                                                                             ├── oargv@1.2.0 (ul@1.1.0)
  ├── bug-killer@1.0.0 (couleurs@1.1.0)                                                                                                                                                                       └── git-stats@1.1.0 (ul@1.1.0, ansi-parser@1.4.0, git-stats-colors@1.0.0, cli-box@2.1.1, moment@2.9.0)
  user@host ~/tmp # git clone https://github.com/IonicaBizau/git-stats
  Cloning into 'git-stats'...                                                                                                                                                                                 remote: Counting objects: 414, done.
  remote: Total 414 (delta 0), reused 0 (delta 0)                                                                                                                                                             Receiving objects: 100% (414/414), 47.08 KiB | 0 bytes/s, done.
  Resolving deltas: 100% (189/189), done.                                                                                                                                                                     Checking connectivity... done.
  user@host ~/tmp : cd git-stats
  user@host ~/tmp/git-stats # git-stats-importer
  info  Done.
  user@host ~/tmp/git-stats # git stats
  ╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
  ║   Mar      Apr      May      Jun      Jul      Aug      Sep      Oct      Nov      Dec      Jan      Feb       ║
  ║Sun   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ║
  ║Mon   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ║
  ║Tue   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■   ║
  ║Wed   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■   ║
  ║Thu   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■   ║
  ║Fri   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■   ║
  ║Sat   ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■   ║
  ║--------------------------------------------------------------------------------------------------------------  ║
  ║Contributions in the last year: 0 | Longest Streak: 0 days | Current Streak: 0 days | Max a day: 0              ║
  ╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
  user@host ~/tmp/git-stats # cat $HOME/.git-stats
  {}

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

#27

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.co…

Does one exclude merge commits while the other includes them?

Yes, git-cal excludes merge commits.

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

#28
post #11

Earlier quoted context omitted.

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

Hmm, just installed git-cal and it certainly is adequately fast on my main work repo. But it seems to just be for the current branch? (That seems sensible enough, but also makes it somewhat less useful.)

Added an option to view stats from all branches ( git-cal --all ), but that'll be slower for large repositories

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

#29
post #13
post #6

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

"Don't break the chain!" http://lifehacker.com/281626/jerry-seinfelds-productivity-se...

I love the don't break the chain thing but just wanted to point out that Jerry Seinfeld said in an AMA on Reddit that he did not invent that program http://www.reddit.com/r/IAmA/comments/1ujvrg/jerry_seinfeld_...

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

#30

Earlier quoted context omitted.

You have to import your commits first: https://github.com/IonicaBizau/git-stats#importing-and-delet...

Still doesn't work (for me, osx) user@host ~/tmp # npm install -g git-stats /usr/local/bin/git-stats -> /usr/local/lib/node_modules/git-stats/bin/git-stats git-stats@1.1.0 /usr/local/lib/node_modules/git-stats ├── ul@1.1.0 ├── ansi-parser@1.4.0 ├── cli-box@2.1.1 (ansi-parser@1.3.0) ├── moment@2.9.0 ├── git-stats-colors@1.0.0 (couleurs@3.0.0) └── bug-killer@1.0.0 (couleurs@1.1.0) user@host ~/tmp # npm install -g git-s…

git-stats-importer also only imports commits by the user set in the global user.email config. Since you haven't made any commits to the git-stats repo, it doesn't show anything.

Edit: it will use the local user.email if that is set. It also will use the GIT_AUTHOR_EMAIL but only as a fallback if user.email is unset

Post reply on HN