fleet-squashing-history

Squash default branch commits into one conventional commit with backup and verification.

125|42|Updated May 19, 2025
One-click install
npx skills add https://github.com/SocketDev/socket-mcp --skill fleet-squashing-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fleet-squashing-history
Source: https://github.com/SocketDev/socket-mcp/tree/main/.agents/skills/fleet-squashing-history
Command: npx skills add https://github.com/SocketDev/socket-mcp --skill fleet-squashing-history

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Squashes all commits on the repository's default branch into a single conventional-commit "chore: initial commit" to simplify history, while keeping a backup and requiring explicit user confirmation before any force push.

Core Features & Use Cases

  • Creates a backup branch of the current HEAD to preserve recoverability.
  • Verifies integrity by comparing repository state before and after squashing.
  • Requires explicit user confirmation before performing a force push to update the remote.
  • Automatically resolves the default branch (main or master) to determine the target of the squash.

Quick Start

Run the fleet-squashing-history workflow to squash history on the default branch after confirming backup.

Frequently Asked Questions about fleet-squashing-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I squash all commits on the default branch into a single commit?

Squash all commits by resolving the default branch, creating a backup branch of the current HEAD, amending into a single 'chore: initial commit', and force-pushing. The workflow requires explicit user confirmation before updating the remote.

What is the safest way to force-push a squashed git history to remote?

Safely force-push squashed history by creating a backup branch first and using a guarded force-push with --force-with-lease. The workflow requires explicit user confirmation before executing the remote update to prevent accidental history loss.

How does git history squashing handle backup and integrity verification?

Git history squashing preserves recoverability by creating a backup branch of the current HEAD. It verifies integrity by comparing the repository state before and after squashing to ensure no data is lost during the commit amend workflow.

Does this git squash workflow automatically resolve main or master as the default branch?

Yes, the squash workflow automatically resolves the default branch to determine the target, whether it is main or master. It then targets that specific branch for the commit-amend workflow and subsequent guarded force-push.

When do I need to squash repository history into a clean initial commit?

Squash repository history when you need a clean history on main or master before a fresh start. This process simplifies the commit log into a single 'chore: initial commit' while keeping a backup branch for recoverability.