Instantly reset Git history to a single fresh commit.
Project description
🚀 commits-nuke
Instantly collapse your entire Git history into a single, fresh initial commit.
commits-nuke is a CLI tool that wipes your local commit history while keeping your current files exactly as they are. It automates the git checkout --orphan process into a single, safe command.
📦 Installation
Recommended (uv)
uv tool install commits-nuke
Standard (pip)
pip install commits-nuke
⌨️ Usage
Run this command inside any local Git repository:
# Default: creates an "Initial commit"
commits-nuke
# Custom message:
commits-nuke "Clean start"
# Check version or help:
commits-nuke -v
commits-nuke -h
Capabilities
- Auto-Branch Detection: Detects your active branch (
main,master, etc.) and replaces it seamlessly. - Safety Catch: Interactive
y/Nconfirmation prevents accidental execution. - Files Preserved: Your current working directory remains untouched; only history is purged.
- Visual Feedback: Provides a dramatic ASCII confirmation upon success.
- Zero Dependencies: Uses only Python standard libraries.
Execution Steps
- Identifies the active branch name.
- Creates a temporary orphan branch (no history).
- Stages all current files and creates a new root commit.
- Deletes the original branch and renames the orphan branch to match.
⚠️ Warning
This action is destructive. It permanently removes all previous local commits. Use only when you want to reset a repository's history to a "Day 1" state.
📜 License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file commits_nuke-1.0.0.tar.gz.
File metadata
- Download URL: commits_nuke-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a736745bc4f8f4ff3e11b82cdee319ae1d302040306be397c3274accfbbb64ee
|
|
| MD5 |
487d9c4accd131b8774d8821e33f796c
|
|
| BLAKE2b-256 |
648e2c830dd1f294fa1ff6fd48a838cbc6c39d1cca003432f983e939a8dfe335
|
Provenance
The following attestation bundles were made for commits_nuke-1.0.0.tar.gz:
Publisher:
publish.yml on joelromanpr/commits-nuke
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
commits_nuke-1.0.0.tar.gz -
Subject digest:
a736745bc4f8f4ff3e11b82cdee319ae1d302040306be397c3274accfbbb64ee - Sigstore transparency entry: 983685354
- Sigstore integration time:
-
Permalink:
joelromanpr/commits-nuke@c0eea861503dea06a9848c7d50256ea581c970d1 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/joelromanpr
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0eea861503dea06a9848c7d50256ea581c970d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file commits_nuke-1.0.0-py3-none-any.whl.
File metadata
- Download URL: commits_nuke-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1abf205bfc9d46a87c1e6daf3e2e98bd22f55d915c11b4129a3fbc0d196b0a85
|
|
| MD5 |
0ddd8f2177cccde1b1cee68cdce45640
|
|
| BLAKE2b-256 |
04be747cc3aab492d310ff93bead913d429dd149bd4508f3f4018a0290a185a9
|
Provenance
The following attestation bundles were made for commits_nuke-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on joelromanpr/commits-nuke
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
commits_nuke-1.0.0-py3-none-any.whl -
Subject digest:
1abf205bfc9d46a87c1e6daf3e2e98bd22f55d915c11b4129a3fbc0d196b0a85 - Sigstore transparency entry: 983685410
- Sigstore integration time:
-
Permalink:
joelromanpr/commits-nuke@c0eea861503dea06a9848c7d50256ea581c970d1 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/joelromanpr
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0eea861503dea06a9848c7d50256ea581c970d1 -
Trigger Event:
release
-
Statement type: