A small Python script that automatically generates commits for a given date range.
Useful for filling the GitHub contribution graph, testing Git workflows, or experimenting with commit history.
- Set start and end date for commits
- Flexible commits per day: random range (e.g. COMMITS_PER_DAY = (2, 4))
- Automatic commit timestamps
- Optional push to remote (
origin)
- Python 3.10+ must be installed on your system
- Git must be available in
$PATH
git clone https://github.com/lifan2029/fill-green.gitrm -rf .gitrmdir /s /q .gitRemove-Item -Recurse -Force .gitTo initialize your own repository and link it with GitHub:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/<username>/<repo>.git
git push -u origin mainpip install GitPythonCOMMITS_PER_DAY = (2, 4) # number of commits per day (fixed: 3 or range: (2, 4))
START_DATE = "2024-01-01" # first commit date
END_DATE = "2024-10-04" # last commit datepython main.pyDeveloped by lifan2029 — Fullstack developer.
If you like this project, feel free to ⭐ star it on GitHub!
