github-ghost-committer
v1.0.4
Published
`github-ghost-committer` is a simple CLI tool that automatically generates **backdated Git commits** across the past N days. You can customize how many commits per day are made, and specify which file to modify. It’s perfect for demonstrations, GitHub con
Readme
📦 github-ghost-committer
github-ghost-committer is a simple CLI tool that automatically generates backdated Git commits across the past N days. You can customize how many commits per day are made, and specify which file to modify. It’s perfect for demonstrations, GitHub contribution graphs, time-based workflows, or simulating activity across time.
✅ Prerequisites
To use this tool, you should already have a Git repository initialized on your local machine. Ideally, this repo should also be connected to a remote GitHub repository if you want your generated commits to appear in your GitHub contribution graph.
Additionally:
- Your repository must contain at least one existing file (e.g.,
new.php,log.txt, or any other dummy file) that can be modified. - If the specified file does not exist, the tool will create it.
- You must have Node.js and npm installed on your system.
🧰 Installation
Install the CLI tool globally via npm:
npm install -g github-ghost-committer🚀 Usage
Navigate to your local Git repository and run the following command:
git-backdate-bot --days=30 --min=2 --max=5 --file=new.phpThis command will create random backdated commits across the last 30 days, with 2 to 5 commits per day, modifying the new.php file on each commit.
⚙️ Command-Line Options
| Option | Type | Default | Description |
| -------- | ------ | ----------- | ------------------------------------------- |
| --days | Number | 30 | Number of past days to generate commits for |
| --min | Number | 2 | Minimum commits per day |
| --max | Number | 7 | Maximum commits per day |
| --file | String | dummy.txt | File to modify and commit each time |
🧪 Example
git-backdate-bot --days=15 --min=3 --max=6 --file=new.phpGenerates random commits for the last 15 days
Each day will have between 3 to 6 commits
Commits modify new.php
Each commit uses a realistic timestamp
📤 Push to GitHub
After generating commits locally, push them to your GitHub repository using:
git push origin mainReplace main with your actual branch name if it's different.
⚠️ Important Notes
Works best when the local repo is clean (no uncommitted changes).
Works with both public and private repositories.
To appear on your GitHub contribution graph:
Commits must be pushed to GitHub
Email must be verified and match your GitHub account
🧩 Use Cases
Simulate activity in inactive repos
Populate contribution graphs
Time-based commit testing
Educational demos on Git workflows
