Created
January 8, 2026 23:56
-
-
Save Nikoloutsos/c227c00b00c223393321306346791310 to your computer and use it in GitHub Desktop.
Script for making old commits - making your graph look greener π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Starting timestamp: January 1, 2025 00:00:00 UTC | |
| start_timestamp=1735689600 | |
| # Ending timestamp: January 1, 2026 00:00:00 UTC | |
| end_timestamp=1767225600 | |
| # Current timestamp | |
| current=$start_timestamp | |
| # Counter for commit messages | |
| counter=1 | |
| # Loop through timestamps | |
| while [ $current -le $end_timestamp ]; do | |
| # Create a dummy change | |
| echo "Commit $counter at timestamp $current" >> activity.txt | |
| # Stage the change | |
| git add activity.txt | |
| # Commit with custom date | |
| git commit --date=$current -m "Activity commit #$counter" | |
| echo "Created commit #$counter for timestamp $current" | |
| # Generate random increment between 0.6 and 2 days in seconds | |
| # 0.6 days = 51840 seconds | |
| # 2 days = 172800 seconds | |
| # Range = 172800 - 51840 = 120960 seconds | |
| random_increment=$((51840 + RANDOM % 120961)) | |
| # Increment timestamp by random amount | |
| current=$((current + random_increment)) | |
| counter=$((counter + 1)) | |
| done | |
| echo "Done! Created $((counter - 1)) commits" | |
| echo "Run 'git push' to push to your repository" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output:
