gitmyhub

gitfiti

Python ★ 8.4k updated 1y ago

abusing github commit history for the lulz

gitfiti is a Python script that draws pixel art on your GitHub profile's contribution calendar by making backdated commits in a pattern you choose.

Pythonsetup: easycomplexity 1/5

gitfiti is a Python script that draws pixel art on the GitHub contribution calendar, the green-square grid shown on every GitHub profile page. That calendar normally reflects how many commits a user made on each day. gitfiti exploits a feature of the git version control system that allows commits to carry any date in the past, and uses it to place commits on specific days in a deliberate pattern, forming images in the grid.

The way it works is straightforward. You run the script, answer a few prompts for your GitHub username, the name of a fresh repository, and which image you want to paint. The tool then generates a shell script (for Mac and Linux) or a PowerShell script (for Windows). Running that generated script makes a flood of backdated commits and pushes them to your repository. The squares on your calendar update to reflect those commits, forming the image. The project notes that you should expect to wait a day or two before the pattern shows up, since GitHub updates the calendar on a delay.

Several pixel-art images are bundled with the project, including a cat, a mushroom from old video games, and the GitHub mascot. You can also write your own templates using a simple text format: a grid of numbers from 0 to 4, where 0 is blank and 4 is the darkest green, matching the shading the calendar uses.

If you change your mind, removing the art is done by deleting the repository you used for it and waiting for GitHub to update the calendar. The README explicitly recommends creating a new, separate repository for this purpose rather than using an existing one, since the process replaces the commit history. The project is licensed under MIT and has inspired a number of derivative tools that offer web-based drawing interfaces for designing templates visually.

Where it fits