Consolidate your contribution graph
Combine your contributions from any repository on your GitHub contribution graph.
The GitHub contribution graph
A friend and I used to work at the same company, where we were using GitHub.
Every year, our contribution graphs looked nice and it was kinda rewarding.
You can do more than just look at it on your GitHub profile page: GitHub Skyline lets you generate a 3D version of it — which is the image at the top of this article. You can then download the 3D file and print it:
Not on GitHub anymore?
The companies we work for now however, use other Git hosting providers. Which means... no more contribution graphs on GitHub 😢
This is where Tim had a beautiful idea: create a tool that regularly scans our work repositories, and creates empty commits in a repository hosted on GitHub! Each empty commit corresponds to a commit made by ourselves in our work repositories, and is made with the same commit date.
The repository gathering all these empty commits can be private on GitHub. (Although even if it's public, no content is present in it.)
Brilliant!
Usage
The tool is own-contribution-graph. To use it, simply:
- install the package:
npm i -g own-contribution-graph
-
create the configuration file following the instructions in the ReadMe,
-
run the following command:
owncontributiongraph --config=<path-to-the-json-config-file>
- I added
own-contribution-graph
to the file~/.nvm/default-packages
, so nvm automatically installs it when I install a new version of Node. - I created a Cron task that executes this command every week, and push to a private GitHub repository.
Our contributions graphs are alive again!
There is a difference though: the merge method we used to use was rebase merging, where all commits from a feature branch are applied one by one on the main branch. Now we use squash merging, were all commits are squashed together into one commit that is applied on the main branch. So less contributions appear on the graph.