An open API service indexing awesome lists of open source software.

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

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.
https://github.com/lifan2029/fill-green

activity-graph automation commit-generator fake-commits git git-automation github-contributions open-source python scripting

Last synced: 4 days ago
JSON representation

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.

Awesome Lists containing this project

README

          


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:

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

### ✨ Delete old `.git` directory

#### Linux / macOS
```bash
rm -rf .git
```

#### Windows (CMD)
```bash
rmdir /s /q .git
```

#### Windows (Powershell)
```bash
Remove-Item -Recurse -Force .git
```

### ✨ Setup your git

To initialize your own repository and link it with GitHub:

```bash
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com//.git
git push -u origin main
```

### ✨ Install dependency:

```bash
pip install GitPython
```

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

```python
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
```bash
python main.py
```

## ✨ Author

Developed by [lifan2029](https://github.com/your-username) — Fullstack developer.
If you like this project, feel free to ⭐ star it on GitHub!

📧 lifan2029@gmail.com