Hacker News new | ask | show | jobs
by jwpalmer6 1813 days ago
OP here.

I wrote up some additional details on how this was created on my blog: https://jpalmer.dev/2021/05/interactive-git-history/.

If anyone has ideas about milestones that I could add to that would make the timeline more interesting/informative, or any other feedback, please let me know.

Happy to answer any questions here.

3 comments

After a user clicks on the streamgraph, the bottom-left displays information about commits by the corresponding contributor in the corresponding quarter; the contributor name is already a link to their GitHub profiles, but the "changes" count could also be made a link to the actual commits.

These links would have the format:

https://github.com/git/git/commits?author=gitster&since=2005...

or

https://github.com/git/git/commits?author=gitster@pobox.com&...

Oh that's a good idea. Thanks!
This is really cool. I started a project in a similar vein a few years back that I loosely called "What Did I Do" that would allow you to track blame / "ownership" over time. I could write out content to the command line, but once it got to the point of starting to put visualizations into the browser (in fact, I also went the D3 route), I started to lose drive. Finding a way to make it visually appealing escaped me - but you've captured it well here, I think. With the work you've done, can you also represent other repositories, or is this heavily focused on the Git repo specifically?
Thanks!

Yes, it's pretty heavily focused on the git repository, but it could be applied to other repositories with a little difficulty, and with mixed results. The main issues would be:

1. Getting the data. Currently a script needs to be run over the contents of a git repository to gather all of the commit data that's required. GitHub's API for commit data wouldn't allow all of the necessary data to be retrieved in a timely fashion, so that needs to be processed offline.

2. Cleaning the data. In order to link to github accounts I had to manually align commit author data to github profiles, which I wanted to do for this project because seeing a person's profile helped link the effort to the individual. You could throw that away for a different repository, I suppose, and just show the commit author information.

3. Creating milestones. The git milestones are mostly handcrafted (linking to release notes where they exist, etc), so they'd need to be replaced with something that could be generated from the repository or from some other process.

That said, I do think that it would be interesting to see other repositories in this style. I tried a couple of others just to see the basics, but the results were underwhelming because the structure of the visualizations depends so greatly on activities of the contributors.

Would you use it on other repositories if you could? Which repositories would be interesting to you?

1. That's basically what I wrote :) although I collected different info. It can be really time intensive for bigger / older repositories...

2. Just going off commit author / email (and then corresponding gravatar) seems like enough. I get hand tailoring for something like this, but for a more "general purpose / throw a repo at me and I'll figure it out," I think using whatever you get is ok

3. Could try using tags for this, or I think specifically from Github, milestones / releases are stored differently? Don't know. I feel like this could also be an "include if present or ignore," although I do appreciate how it breaks up the history into a timeline

I don't have any specific projects in mind - for my own playing, I just used my own personal / work repos that I had available on my computer. I think the bigger, popular projects like Angular, React, or even language projects .NET Core or TypeScript could be interesting. I don't know if they would make great graphs or not though, I imagine it would be largely trial and error.

Neat! Thanks for sharing.

>Note: This visualization was designed for screens larger than 1024 x 1024 and for desktop-style interactions.

Why am I getting this warning on my 4K UHD display? Both Firefox 89 and Chrome 91 on Ubuntu.

Because I am terrible at making CSS do what I want, unfortunately.

Seriously, though, I think I do some type of aspect ratio check - maybe that's the culprit.

Ah, so not sure how you're checking, but it looks like your thresholds might be just too aggressive: it looks like my window.innerHeight < 1024 [1] and that's probably triggering the warning.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Window/inne...