Skip to main content

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/N confirmation 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

  1. Identifies the active branch name.
  2. Creates a temporary orphan branch (no history).
  3. Stages all current files and creates a new root commit.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commits_nuke-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commits_nuke-1.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for commits_nuke-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a736745bc4f8f4ff3e11b82cdee319ae1d302040306be397c3274accfbbb64ee
MD5 487d9c4accd131b8774d8821e33f796c
BLAKE2b-256 648e2c830dd1f294fa1ff6fd48a838cbc6c39d1cca003432f983e939a8dfe335

See more details on using hashes here.

Provenance

The following attestation bundles were made for commits_nuke-1.0.0.tar.gz:

Publisher: publish.yml on joelromanpr/commits-nuke

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for commits_nuke-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1abf205bfc9d46a87c1e6daf3e2e98bd22f55d915c11b4129a3fbc0d196b0a85
MD5 0ddd8f2177cccde1b1cee68cdce45640
BLAKE2b-256 04be747cc3aab492d310ff93bead913d429dd149bd4508f3f4018a0290a185a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for commits_nuke-1.0.0-py3-none-any.whl:

Publisher: publish.yml on joelromanpr/commits-nuke

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page