Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 94 additions & 23 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
GitHub Activity Generator [![Gitter](https://badges.gitter.im/github-activity-generator/community.svg)](https://gitter.im/github-activity-generator/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![build](https://github.com/Shpota/github-activity-generator/workflows/build/badge.svg)](https://github.com/Shpota/github-activity-generator/actions?query=workflow%3Abuild)
=========================
# GitHub Activity Generator [![Gitter](https://badges.gitter.im/github-activity-generator/community.svg)](https://gitter.im/github-activity-generator/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![build](https://github.com/Shpota/github-activity-generator/workflows/build/badge.svg)](https://github.com/Shpota/github-activity-generator/actions?query=workflow%3Abuild)

A script that helps you *instantly* generate a beautiful GitHub Contributions Graph
A script that helps you _instantly_ generate a beautiful GitHub Contributions Graph
for the last year.

## ⚠ Disclaimer

This script is for educational purposes and demonstrating GitHub mechanics. It should not be used to misrepresent professional contributions or coding activity.
> [!IMPORTANT]
>
> This script is for educational purposes and demonstrating GitHub mechanics. It should not be used to misrepresent professional contributions or coding activity.

## Check my other projects

Expand All @@ -18,43 +17,89 @@ tools** which I encourage you to check:
- [goxygen](https://github.com/Shpota/goxygen) - Web project generator
- [zeit](https://github.com/Shpota/zeit) - A Fitbit clock face for learners of the German language


## What it looks like

### Before :neutral_face: :no_mouth: :unamused:
### Before :neutral_face: :no_mouth: :unamused:

![Before](before.png)

### After :muscle: :relieved: :heart: :sunglasses: :metal: :horse: :wink: :fire: :dancer: :santa: :fireworks: :cherries: :tada:

![After](after.png)

## How to use

1. Create an empty GitHub repository. Do not initialize it.
2. Download [the contribute.py script](https://github.com/Shpota/github-activity-generator/archive/master.zip)
and execute it passing the link on the created repository
2. Download [the contribute.py script](https://github.com/Shpota/github-activity-generator/archive/master.zip)
and execute it passing the link on the created repository

```sh
python contribute.py [email protected]:user/repo.git
```

Now you have a repository with lots of changes in your GitHub account.
Note: it takes several minutes for GitHub to reindex your activity.

> [!NOTE]
> Note: it takes several minutes for GitHub to reindex your activity.

### Multithreading Support

The script now uses **multithreading** to generate commits in parallel, making it **2-4x faster**!

```sh
# Use 6 threads for faster execution (default is 4)
python contribute.py --max_threads=6 [email protected]:user/repo.git
```

### Progress Bar

Watch your commits being generated in real-time with a beautiful progress bar

```
Creating commits: 45%|████████████▌ | 452/1000 [00:23<00:28, 19.45commit/s]
```

> [!NOTE]
> The progress bar requires `tqdm` (optional dependency). Install it for the best experience:

```sh
pip install tqdm
# OR
pip install -r requirements.txt
```

**Without tqdm:** The script works perfectly fine without it! Fallback to simple progress indicator instead
Comment on lines +62 to +71
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note about the progress bar not requiring tqdm contradicts the earlier statement. Line 63 says "The progress bar requires tqdm" but line 71 says "Without tqdm: The script works perfectly fine without it! Fallback to simple progress indicator instead". Consider clarifying that tqdm is optional but provides an enhanced progress bar, while a basic progress indicator is used as a fallback.

Copilot uses AI. Check for mistakes.

### Performance Improvements

- **1000 commits**: ~5-8 minutes → ~2-3 minutes (with 4 threads)
- **2000 commits**: ~10-16 minutes → ~4-6 minutes (with 4 threads)

## How it works
The script initializes an empty git repository, creates a text file and starts
generating changes to the file for every day within the last year (0-20 commits

The script initializes an empty git repository, creates a text file and starts
generating changes to the file for every day within the last year (0-20 commits
per day). Once the commits are generated it links the created repository with
the remote repository and pushes the changes.

## Customizations

You can customize how often to commit and how many commits a day to make, etc.

For instance, with the following command, the script will make from 1 to 12
For instance, with the following command, the script will make from 1 to 12
commits a day. It will commit 60% days a year.

```sh
python contribute.py --max_commits=12 --frequency=60 [email protected]:user/repo.git
```

Use `--no_weekends` option if you don't want to commit on weekends

```sh
python contribute.py --no_weekends
```
If you do not set the `--repository` argument the script won't push the changes.

If you do not set the `--repository` argument the script won't push the changes.
This way you can import the generated repository yourself.

Use `--days_before` and `--days_after` to specify how many days before the current
Expand All @@ -65,37 +110,63 @@ will keep committing.
python contribute.py --days_before=10 --days_after=15
```

Use `--max_threads` to control the number of parallel threads (default: 4, recommended: 2-8):

```sh
python contribute.py --max_threads=8 --frequency=90 [email protected]:user/repo.git
```

Run `python contribute.py --help` to get help.

## System requirements
To be able to execute the script you need to have Python and Git installed.

To be able to execute the script you need to have **Python** and **Git** installed.

**Optional dependency:**

- `tqdm` - For enhanced progress bar (highly recommended but not required)

```sh
pip install tqdm
```

The script works without it, showing a simple text progress indicator instead.

## Troubleshooting

#### I performed the script but my GitHub activity is still the same.
### I performed the script but my GitHub activity is still the same

It might take several minutes for GitHub to reindex your activity. Check
if the repository has new commits and wait a couple of minutes.
#### The changes are still not reflected after some time.

### The changes are still not reflected after some time

Are you using a private repository? If so, enable showing private contributions
[following this guide](https://help.github.com/en/articles/publicizing-or-hiding-your-private-contributions-on-your-profile).

#### Still no luck

Make sure the email address you have in GitHub is the same as you have in
your local settings. GitHub counts contributions only when they are made
your local settings. GitHub counts contributions only when they are made
using the corresponding email.

Check your local email settings with:
```

```sh
git config --get user.email
```

If it doesn't match with the one from GitHub reset it with
```

```sh
git config --global user.email "[email protected]"
```

Create a new repository and rerun the script.

#### There are errors in the logs of the script.
### There are errors in the logs of the script

Maybe you tried to use an existing repository. If so, make sure you are using
a new one which is *not initialized*.
a new one which is _not initialized_.

**If none of the options helped, open an issue and I will fix it as soon as possible.**
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
flake8 test_contribute.py
- name: Test for commits
run: |
python -m unittest test_contribute
python -m unittest test_contribute
Loading