A script to instantly generate a beautiful GitHub Contributions Graph for the last year.
This script is a fork of Shpota's GitHub Activity Generator. I am not the original author and am not responsible for misuse. The goal is not to cheat but to create a visually appealing contributions graph if people judge your GitHub activity.
- Create an empty SPAM GitHub repository or use an existing one (Not recommended).
- Download contribute.py and run it:
python contribute.py [email protected]:user/repo.git
After running, it may take a few minutes for GitHub to reindex your activity.
The script initializes a git repo, generates commits (0-20 per day) for the last year, and then pushes the changes to a remote repository.
Try python contribute.py --help
for more options.
You can adjust commit frequency, the number of commits per day, and more. For example, to make 1-12 commits per day, 60% of the year:
python contribute.py --max_commits=12 --frequency=60 [email protected]:user/repo.git
To exclude weekends:
python contribute.py --no_weekends
Key improvements over the original:
- Directory Creation: Checks if the directory exists before creating it.
- Git Initialization: Initializes Git and checks/creates the
main
branch if needed. - User Configuration: Sets Git user config after branch creation and remote verification.
- Remote Check: Verifies if the remote exists before adding.
- Branch Management: Ensures
main
exists before using it. - Commit Handling: Adds only the
README.md
file for commits. - Push to Remote: Merges with the remote before pushing.
- Error Handling: Adds additional checks (e.g.,
has_changes()
andcheck_git_status()
). - Modularity: More functions for handling various tasks like remote, branch, and status checks.
Ensure Python and Git are installed.
- No Activity Reflected: Wait for GitHub to reindex your activity (can take a few minutes).
- Private Repository: Enable showing private contributions here.
- Email Mismatch: Ensure your GitHub email matches your local Git email:
git config --get user.email
git config --global user.email "[email protected]"