branch-squash

Group and squash feature branch commits via a scripted interactive rebase.

2|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/soumyaray/ray-ai-skills --skill branch-squash
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch-squash
Source: https://github.com/soumyaray/ray-ai-skills/tree/main/ray-branch-squash
Command: npx skills add https://github.com/soumyaray/ray-ai-skills --skill branch-squash

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze commits on the current branch, propose meaningful groupings, and execute a scripted interactive rebase to squash them.

Core Features & Use Cases

  • Determine the base branch automatically (auto-detect main/develop).
  • List commits on <base>..HEAD and propose logical groupings based on changes.
  • Generate a scripted interactive rebase workflow to combine commits into meaningful units.
  • Safety: create a backup branch before rebasing; handle merge commits; report conflicts and allow abort.

Quick Start

Start the squash workflow on your current branch and let the assistant group commits and perform the scripted rebase.

Frequently Asked Questions about branch-squash

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

FAQPage Schema
How do I squash commits on a feature branch into meaningful groups?

This workflow analyzes commits on your feature branch, proposes logical groupings based on changes, and generates a scripted interactive rebase plan to squash them into meaningful units.

What is the best way to group and squash git commits before merging?

Using an automated grouping heuristic is best; it evaluates branch commits, proposes logical units based on changes, and generates a scripted interactive rebase to squash them cleanly.

Does this squash workflow create a backup branch before rebasing?

Yes, the squash workflow creates a backup branch before executing the interactive rebase, ensuring you can safely verify results or recover your original commit history if conflicts occur.

Can I use an interactive rebase script to squash commits on branches with merge commits?

Yes, the workflow handles merge commits during grouping and generates a scripted interactive rebase plan that safely guides base detection and conflict reporting for complex branches.

How does automated base branch detection work when squashing git commits?

Automated base branch detection identifies your main or develop branch, lists commits from that base to HEAD, and uses them to propose meaningful squash groupings for the rebase script.

When should I avoid squashing commits with an interactive rebase script?

Avoid squashing commits if your branch requires preserving individual commit context, though the workflow provides conflict reporting and an abort option for safety checks during the rebase process.