Skip to content

lifan2029/fill-green

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image

Git Commit Generator

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.

✨ Features

  • 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)

🔧 Requirements

  • Python 3.10+ must be installed on your system
  • Git must be available in $PATH

🚀 Quick start

✨ Clone the repository:

git clone https://github.com/lifan2029/fill-green.git

✨ Delete old .git directory

Linux / macOS

rm -rf .git

Windows (CMD)

rmdir /s /q .git

Windows (Powershell)

Remove-Item -Recurse -Force .git

✨ Setup your git

To 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 main

✨ Install dependency:

pip install GitPython

✨ Before running the script, open main.py and set the parameters:

COMMITS_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 date

✨ Start script and enjoy

python main.py

✨ Author

Developed by lifan2029 — Fullstack developer.
If you like this project, feel free to ⭐ star it on GitHub!

📧 lifan2029@gmail.com

About

A Python script that automatically generates commits for a given date range, with customizable commit frequency per day. Useful for visualizing contributions on GitHub activity graph.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages