From 1de019cf6a783588f814c328a81a0a544a098725 Mon Sep 17 00:00:00 2001 From: TM Date: Thu, 1 Oct 2026 20:01:07 +0700 Subject: [PATCH] Update GhostCommit 3.0 --- README.md | 97 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 6f416413..73146b74 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ + @@ -16,16 +17,15 @@
-> GhostCommit fills your GitHub contribution graph with backdated commits, randomly distributed across the past years. Built to be minimal, stable, and safe to run for hundreds of commits at once without crashing. +> GhostCommit fills your GitHub contribution graph with backdated commits, randomly distributed across any time range you choose — years, months, weeks, days, or a single specific date. Built to be minimal, stable, and safe to run for hundreds of commits at once without crashing. --- ## Preview ``` - ________ ___ ___ ________ ____________________ - / _____/ / | \\_____ \ / _____/\__ ___/ + / _____/ / | \_____ \ / _____/\__ ___/ / \ ___/ ~ \/ | \ \_____ \ | | \ \_\ \ Y / | \/ \ | | \______ /\___|_ /\_______ /_______ / |____| @@ -33,23 +33,40 @@ COMMIT Author : @MatrixTM26 - Version : 2.0 + Version : 3.0 - 1 - Commit by Years - 2 - Commit by Month - 0 - Exit + 1 ─ Commit by Years + 2 ─ Commit by Month + 3 ─ Commit by Week + 4 ─ Commit by Day + 5 ─ Commit on Specific Date + 0 ─ Exit - :: Option > 1 - ~[Years Count] > 2 - ~[Commit Count] > 1000 + :: Option > 5 + ~[Date YYYY-MM-DD] > 2024-03-15 + ~[Commit Count] > 200 - Mode: Commit by Years (2y, 1000 commits) + Mode: Specific Date (2024-03-15, 200 commits) - [██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒] 4.8% (48/1000) + [████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒] 20.0% (40/200) ``` --- +## Modes + +| Option | Mode | Input | Description | +| ------ | ---- | ----- | ----------- | +| `1` | **Commit by Years** | Years count | Spreads commits randomly across the last N years | +| `2` | **Commit by Month** | Month count | Spreads commits randomly across the last N months | +| `3` | **Commit by Week** | Week count | Spreads commits randomly across the last N weeks | +| `4` | **Commit by Day** | Day count | Spreads commits randomly across the last N days | +| `5` | **Specific Date** | `YYYY-MM-DD` | Spreads commits across the full 24 hours of a single date | + +> **Specific Date** validates the input automatically — invalid formats, non-existent dates (e.g. Feb 30), and future dates are all rejected with a re-prompt until a valid date is entered. + +--- + ## Requirements @@ -75,16 +92,9 @@ git clone https://github.com/MatrixTM26/GhostCommit.git cd GhostCommit npm init -y -npm i simple-git moment jsonfile random -``` - -Open `package.json` and change: - -```json -"type": "commonjs" ``` -to: +Open `package.json` and set: ```json "type": "module" @@ -98,7 +108,7 @@ to: node GhostCommit.js ``` -That is all. GhostCommit will generate commits, display a live progress bar, and push everything once it finishes. +GhostCommit will prompt you to choose a mode, enter the range or date, and the number of commits. It then generates all commits with backdated timestamps, displays a live progress bar, and pushes everything once it finishes. --- @@ -108,21 +118,19 @@ Open `GhostCommit.js` and edit the `Config` object at the top of the file: ```js const Config = { - TotalCommits: 100, + TotalCommits: 1000, DataFile: "./data.json", RetryAttempts: 3, - PushAfterAll: true, - Verbose: false + PushAfterAll: true }; ``` -| Key | Default | Description | -| --------------- | ------------- | --------------------------------------- | -| `TotalCommits` | `100` | Total number of commits to generate | -| `DataFile` | `./data.json` | File that gets modified on each commit | -| `RetryAttempts` | `3` | How many times to retry a failed commit | -| `PushAfterAll` | `true` | Push all commits at the end in one go | -| `Verbose` | `false` | Print each commit date as it runs | +| Key | Default | Description | +| --- | ------- | ----------- | +| `TotalCommits` | `1000` | Default commit count shown as fallback when input is empty | +| `DataFile` | `./data.json` | File that gets modified and staged on each commit | +| `RetryAttempts` | `3` | How many times to retry a failed commit before skipping | +| `PushAfterAll` | `true` | Push all commits to remote at the end in one go | --- @@ -136,14 +144,31 @@ GhostCommit/ └── README.md ``` +--- + +## Changelog + +### v3.0 +- Added **Commit by Week** mode +- Added **Commit by Day** mode +- Added **Commit on Specific Date** mode with full input validation +- Refactored menu dispatch to handler map — no more if-else chains +- Each mode isolated into its own handler function + +### v2.0 +- Added **Commit by Month** mode +- Live progress bar with percentage and counter +- Retry mechanism per commit +- Auto push after all commits finish + +--- +

© - Copyright 2023-2026 + Copyright 2023-2026 @MatrixTM26 -   - · -   - All right reserved. +  ·  + All rights reserved.
Licensed under