Fill your GitHub contribution graph with backdated commits β make it green!
A Python script that creates empty commits with backdated timestamps across your repositories, making your GitHub profile look active and productive.
- β Auto-detect repos β Scans all your public & private repositories
- β Realistic distribution β Random times between 9am-9pm
- β Configurable coverage β Choose what percentage of days to fill (default: 78%)
- β Multiple repos β Spreads commits across repos for natural look
- β Safe & reversible β Only creates empty commits (no code changes)
- β Reproducible β Uses seeds for consistent results
- β Custom messages β Choose your own commit messages
- β Dry run mode β Preview before pushing
No dependencies required! Just Python 3.7+ and curl.
git clone https://github.com/fikrado2/github-green-graph.git
cd github-green-graph
python green_graph.py --helppython green_graph.py --token YOUR_GITHUB_TOKENThis will:
- Fetch all your repositories
- Calculate days from June 2025 to today
- Create commits on ~78% of days
- Push everything to GitHub
python green_graph.py --token ghp_xxxx \
--start 2024-01-01 \
--end 2024-12-31python green_graph.py --token ghp_xxxx \
--repos user/repo1 user/repo2 user/repo3python green_graph.py --token ghp_xxxx \
--coverage 0.9python green_graph.py --token ghp_xxxx \
--messages "chore: update" "fix: typo" "feat: add" "refactor: cleanup"python green_graph.py --token ghp_xxxx \
--dry-run| Option | Description | Default |
|---|---|---|
--token |
GitHub personal access token (required) | β |
--start |
Start date (YYYY-MM-DD) | 2025-06-01 |
--end |
End date (YYYY-MM-DD) | Today |
--coverage |
Fraction of days to fill (0.0-1.0) | 0.78 |
--repos |
Specific repos to use | Auto-detect all |
--name |
Git author name | fikrado2 |
--email |
Git author email | fikrado1@gmail.com |
--seed |
Random seed | 42 |
--dry-run |
Show plan without pushing | False |
--messages |
Custom commit messages | Built-in list |
- Go to GitHub Settings β Developer settings β Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
- β
repo(full repository access) - β
workflow(optional, for Actions)
- β
- Copy the token (you won't see it again!)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. Fetch all repos via GitHub API β
β 2. Calculate which days get commits (78% random) β
β 3. Clone each repo β
β 4. Create empty commits with backdated timestamps β
β using GIT_AUTHOR_DATE & GIT_COMMITTER_DATE β
β 5. Push to GitHub β
β 6. GitHub's contribution graph shows green squares β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The script uses Git's official environment variables to set commit dates:
GIT_AUTHOR_DATE="2025-07-15T14:32:07"
GIT_COMMITTER_DATE="2025-07-15T14:32:07"
git commit --allow-empty -m "update readme"- Empty commits only β No code changes are made
- Your repos β Only works on repositories you own/have push access to
- Reversible β You can reset with
git rebaseor delete the repo - GitHub's policy β This is for fun/personal use. Don't misrepresent contributions professionally
- Rate limits β GitHub API has limits; the script handles this gracefully
π’ GitHub Green Graph
==================================================
Token: β
Set
Range: 2025-06-01 β 2026-09-11
Coverage: 78%
Seed: 42
Author: fikrado2 <fikrado1@gmail.com>
π
Total days: 468
π
Active days: 357
π Fetching your repositories...
Found 8 repositories
π¦ Cloning user/repo1...
π Adding 45 days to user/repo1...
π Pushing user/repo1 (45 commits)...
β
Pushed successfully!
π¦ Cloning user/repo2...
π Adding 50 days to user/repo2...
π Pushing user/repo2 (50 commits)...
β
Pushed successfully!
==================================================
π DONE! Made 357 commits across 357 days
Check: https://github.com/fikrado2
Contributions welcome! Feel free to open issues or PRs.
MIT License β see LICENSE for details.
- GitHub: github.com/fikrado2
- Website: fikrado2.github.io
- Twitter: @fikrado1
github green-graph contributions python automation git backdate profile commits script tool cli
Made with β€οΈ by Yahye Abdirahman (fikrado2)