Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🟒 GitHub Green Graph

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.

GitHub Python MIT License


πŸš€ Features

  • βœ… 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

πŸ“¦ Installation

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 --help

πŸ”§ Usage

Basic Usage

python green_graph.py --token YOUR_GITHUB_TOKEN

This will:

  1. Fetch all your repositories
  2. Calculate days from June 2025 to today
  3. Create commits on ~78% of days
  4. Push everything to GitHub

Custom Date Range

python green_graph.py --token ghp_xxxx \
  --start 2024-01-01 \
  --end 2024-12-31

Specific Repositories

python green_graph.py --token ghp_xxxx \
  --repos user/repo1 user/repo2 user/repo3

Higher Coverage (90%)

python green_graph.py --token ghp_xxxx \
  --coverage 0.9

Custom Commit Messages

python green_graph.py --token ghp_xxxx \
  --messages "chore: update" "fix: typo" "feat: add" "refactor: cleanup"

Dry Run (Preview Only)

python green_graph.py --token ghp_xxxx \
  --dry-run

βš™οΈ Options

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

πŸ”‘ Getting a GitHub Token

  1. Go to GitHub Settings β†’ Developer settings β†’ Personal access tokens
  2. Click "Generate new token (classic)"
  3. Select scopes:
    • βœ… repo (full repository access)
    • βœ… workflow (optional, for Actions)
  4. Copy the token (you won't see it again!)

πŸ“Š How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  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"

⚠️ Important Notes

  • 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 rebase or 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

🎯 Example Output

🟒 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

🀝 Contributing

Contributions welcome! Feel free to open issues or PRs.


πŸ“„ License

MIT License β€” see LICENSE for details.


πŸ”— Links


🏷️ Tags

github green-graph contributions python automation git backdate profile commits script tool cli


Made with ❀️ by Yahye Abdirahman (fikrado2)

About

🟒 Fill your GitHub contribution graph with backdated commits β€” make it green!

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages