A fully automated Python script that runs in Google Colab to generate backdated commits and customize your GitHub contribution graph.
Warning
This script creates backdated commits to artificially populate your GitHub contribution graph.
- Use responsibly. Artificially inflating contributions may be viewed negatively by potential employers or collaborators who review your profile.
- You need a GitHub Personal Access Token (classic) with
reposcope to push commits. - The script force-pushes to your repository, overwriting its commit history. Use a dedicated, empty repository to avoid losing important work.
- This tool is intended for educational purposes and personal experimentation only.
- What is This Tool?
- Why Use This Method?
- Prerequisites
- Step-by-Step Guide
- Configuration Options
- How It Works
- Troubleshooting
- Credits & Acknowledgments
- License & Disclaimer
This tool generates backdated commits over a specified date range, allowing you to customize the appearance of your GitHub contribution graph.
Two Modes Available:
- Random Commit Pattern β Creates a gradually increasing density of commits (rampβup effect) over a date range.
- π¨ Custom Text Mode β Draws words like
HELLOorGITHUBdirectly onto your contribution graph using a 5Γ7 pixel font. Each letter is mapped to specific days, creating a clean, pixelβart style message.
Common Use Cases:
- Experimenting with Git's backdating capabilities for educational purposes.
- Creating a specific visual pattern or message on your contribution graph for fun.
- Understanding how GitHub's contribution tracking works.
Note
This tool does not unlock any GitHub achievement. It is purely a customization utility.
| Feature | Benefit |
|---|---|
| βοΈ No PC Required | Runs entirely in Google Colab (cloudβbased). Works on any device with a browser. |
| π Flexible Date Range | Specify any start and end date for your commit pattern. |
| π Customizable Density | Control the minimum and maximum commits per day. |
| π¨ Draw Text | Spell words using the contribution graph's green squares. |
| π Fully Automated | Clones, commits, and force-pushes automatically. |
| π¦ Minimal Dependencies | Only uses GitPython and standard libraries. |
Before you begin, make sure you have:
- A GitHub account.
- An empty or dedicated repository where you have write access (create a new one to avoid losing real work).
- A GitHub Personal Access Token (Classic) with
reposcope.
- Go to Settings β Developer settings β Personal access tokens β Tokens (classic).
- Click Generate new token (classic).
- Give it a name (e.g.,
Commit Graph Generator). - Under Select scopes, check
repo(this grants full control of your repositories). - Click Generate token and copy the token immediately β you won't see it again.
π Keep this token secret. Never share it with anyone or upload it to a public place.
Inside the Colab notebook, you'll find a single configuration cell with form fields. Choose between the Random Pattern (default) and Custom Text Mode by toggling USE_CUSTOM_TEXT.
Click Runtime β Run all (or press Ctrl+F9). The notebook will:
- Install
GitPython - Clone your repository
- Generate backdated commits according to your chosen mode
- Force-push the new history to GitHub
You'll see realβtime output like:
π
Commit Graph Generator for user 'Shineii86'
Repository: commit-graph-demo
π¨ Drawing text: "HELLO"
Starting 0 week(s) after 2026-04-01
3 commit(s) per pixel
π 2026-04-01: 9 commits
π 2026-04-02: 6 commits
...
β
Created commits on 21 days to spell "HELLO".
β« Pushing to remote...
β
Force push complete.
β¨ Done! Your contribution graph will update shortly.
π Visit: https://github.com/Shineii86
- Go to your GitHub profile:
https://github.com/YOUR_USERNAME - The contribution graph will update within a few minutes to reflect the new commits.
All parameters are adjustable directly in the Colab form. The form is divided into three sections: Common Settings, Custom Text Mode, and Random Pattern Mode.
| Variable | Description | Example Value |
|---|---|---|
GITHUB_USERNAME |
Your GitHub handle | "Shineii86" |
GITHUB_TOKEN |
Personal Access Token (keep secret!) | "ghp_abc123..." |
REPO_NAME |
Target repository (must exist under your account) | "commit-graph-demo" |
FORCE_PUSH |
Overwrite remote history (required) | True |
USE_CUSTOM_TEXT |
Toggle between Custom Text (True) and Random Pattern (False). |
False |
Used when USE_CUSTOM_TEXT = False. Creates commits with a linear rampβup in density.
| Parameter | Default | Description |
|---|---|---|
START_DATE |
"2026-04-01" |
First date to create commits. |
END_DATE |
"2026-04-15" |
Last date to create commits. |
MIN_COMMITS_START |
0 |
Minimum commits on the first day. |
MAX_COMMITS_START |
5 |
Maximum commits on the first day. |
MIN_COMMITS_END |
5 |
Minimum commits on the last day. |
MAX_COMMITS_END |
10 |
Maximum commits on the last day. |
Commit Density Logic
The script linearly interpolates the commit count ranges from start to end. For a constant density, set the start and end min/max values equal.
Used when USE_CUSTOM_TEXT = True. Draws a word or phrase using the contribution graph as a canvas.
| Parameter | Default | Description |
|---|---|---|
CUSTOM_TEXT |
"HELLO" |
The word to draw. Supported characters: uppercase A-Z, digits 0-9, space, ., !, ?. |
START_DATE |
"2026-04-01" |
The Sunday of the week where drawing begins (the script autoβadjusts to Sunday if a different day is given). |
TEXT_START_OFFSET_WEEKS |
0 |
Number of empty weeks to skip after START_DATE before drawing the text (shifts the text to the right). |
COMMITS_PER_PIXEL |
3 |
How many commits to create for each "on" pixel. Higher numbers = darker green squares (max shade usually at 4β5 commits). |
- Each character is rendered using a 5Γ7 pixel font. The top row corresponds to Sunday, the bottom row to Saturday.
- Characters are placed sideβbyβside with a 1βcolumn gap.
- The script calculates the exact days that need commits and pushes them with backdated timestamps.
Example: Drawing "HI"
| Setting | Value |
|---|---|
CUSTOM_TEXT |
"HI" |
START_DATE |
"2026-04-05" (a Sunday) |
COMMITS_PER_PIXEL |
3 |
The result on your graph:
Sun Mon Tue Wed Thu Fri Sat
β β β β β 'H' (first week)
β β β β
β β β β
ββββ ββββ
β β β β
β β β β
β β β β
Sun Mon Tue Wed Thu Fri Sat
ββββ ββ β 'I' (second week)
ββ ββ
ββ ββ
ββ ββ
ββ ββ
ββ ββ
ββββ ββ
π‘ Tip: Because GitHub contribution weeks start on Sunday, choose a
START_DATEthat is a Sunday for predictable alignment.
The script performs the following steps:
- Clones the Repository: Uses your Personal Access Token to clone the specified repository into the Colab environment.
- Configures Git User: Sets the commit author and email to your GitHub identity.
- Generates Commits:
- Random Mode: Iterates through each day, calculates a random number of commits, and creates them with backdated timestamps.
- Custom Text Mode: Converts the input string to pixel coordinates, groups them by day, and creates the required number of commits per day.
- Force Pushes: Overwrites the remote repository's history with the new commit chain. This is necessary because backdating changes the commit timestamps, altering the existing history.
β οΈ Force push is destructive. It replaces the entire commit history on the remote branch. Always use a dedicated repository.
| Issue | Solution |
|---|---|
github.GithubException.BadCredentialsException |
Your Personal Access Token is incorrect or expired. Generate a new one. |
Permission denied or Authentication failed |
Ensure your token has the repo scope checked. |
| Repository not found | Verify the repository name is correct and exists under your account. |
| Contribution graph not updating | Wait a few minutesβGitHub's graph updates are not instant. Also ensure the repository is public or that you've enabled private contributions in your profile settings. |
GitCommandError: cannot push |
Make sure FORCE_PUSH is set to True. Backdated commits require force-pushing. |
| Commits appear on wrong dates | Verify the date format is YYYY-MM-DD. For Custom Text mode, ensure START_DATE is a Sunday or let the script autoβadjust. |
| Custom text characters are missing or misaligned | Only uppercase letters, digits, and the symbols . ! ? are supported. The script will skip unsupported characters. |
This project is licensed under the MIT License β see the LICENSE file for details.
Warning
This script is intended for educational purposes and personal experimentation only. Artificially inflating your contribution graph may be viewed negatively by potential employers or collaborators. The author is not responsible for any consequences arising from misuse of this tool, including but not limited to damage to professional reputation or violation of platform terms.
π¨ Follow me on GitHub
