jj:squash

Squash working copy changes into ancestor commits using jj.

1|Updated Feb 4, 2023
One-click install
npx skills add https://github.com/jbott/nix-config --skill jj-squash
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jj:squash
Source: https://github.com/jbott/nix-config/tree/main/home-manager/programs/claude-code/skills/jj%3Asquash
Command: npx skills add https://github.com/jbott/nix-config --skill jj-squash

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Squash changes from the current working copy into relevant ancestor commits to keep the project history clean and readable, avoiding a tangle of small, piecemeal commits.

Core Features & Use Cases

  • Move changes from the working copy into its parent or a specified ancestor commit.
  • Identify candidate commits with jj log and inspect changes with jj diff for selective squashing.
  • Support both whole-file and sub-file chunk squashing, enabling precise history edits while preserving context.

Quick Start

Squash the current working copy into its parent or a chosen ancestor.

Frequently Asked Questions about jj:squash

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

FAQPage Schema
How do I squash changes into an ancestor commit using jj?

To squash changes into an ancestor commit using jj, identify candidate commits with jj log, inspect changes with jj diff, and execute the squash command to consolidate working copy updates into the designated parent or ancestor commit.

What is the best way to keep version control history clean when using jj?

Squashing changes from the working copy into relevant ancestor commits keeps version control history clean and readable, avoiding a tangle of small, piecemeal commits while preserving the original commit context.

How does jj handle squashing large sets of changes across multiple commits?

The jj tool handles large sets of changes by mapping them to target ancestor commits based on path and description. This workflow consolidates extensive working copy modifications into appropriate ancestors to maintain a structured project history.

When should I avoid squashing working copy changes into ancestor commits?

You should avoid squashing changes into ancestor commits when you need to preserve a detailed, sequential record of small, piecemeal updates, as squashing consolidates history and removes the individual commit granularity.