squash

Squash all branch commits into one via interactive git rebase.

Updated May 20, 2026
One-click install
npx skills add https://github.com/paywhereb/paywhere-claude-plugins --skill squash-paywhereb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash
Source: https://github.com/paywhereb/paywhere-claude-plugins/tree/main/paywhere-eng-workflow/skills/squash
Command: npx skills add https://github.com/paywhereb/paywhere-claude-plugins --skill squash-paywhereb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents messy pull-request histories by consolidating many commits on a branch into a single, reviewable commit.

Core Features & Use Cases

  • Interactive rebase squashing: Automatically rewrites the commit sequence by converting subsequent commits into squash operations.
  • Message composition: Builds a final squashed commit message that includes a summary plus a structured list of the original commit subjects and bodies.
  • Safety guardrails: Checks for the base branch, ensures the working tree is clean, handles “nothing to squash,” and stops on rebase conflicts instead of pushing changes.

Quick Start

Ask the AI to squash all commits on your current branch into one commit using the base branch master.

Frequently Asked Questions about squash

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

FAQPage Schema
How do I squash all commits on a branch into one clean commit for a pull request?

Squashing commits for a pull request requires using an interactive git rebase against a known base branch. It rewrites pick commands into squash operations and composes an aggregated commit message to ensure clean branch history.

What does git interactive rebase squashing do to my commit history?

Git interactive rebase squashing rewrites your commit sequence by converting subsequent commits into squash operations. This consolidates multiple branch commits into a single reviewable commit with a structured message.

When do I need to squash commits before merging a pull request?

You need to squash commits when your pull request history is messy. It consolidates many branch commits into a single reviewable commit to maintain pull request hygiene before merging.

Does squashing commits via interactive rebase work if my working tree is not clean?

Squashing commits via interactive rebase does not work with an unclean working tree. Safety guardrails validate a clean working tree and a known base branch before rewriting pick commands into squash operations.

What happens if there are rebase conflicts while squashing branch history?

When rebase conflicts occur while squashing branch history, the process stops rather than automatically pushing changes or resolving conflicts. This ensures you manually handle interactive rebase discrepancies.

Can I automatically force-push after squashing commits into a single commit?

You cannot automatically force-push after squashing commits because the workflow avoids force-push automation. It safely stops after composing the aggregated commit message, leaving push actions manual.