squash-merge

Squash a GitHub pull request's commit history into a single commit.

Updated May 17, 2022
One-click install
npx skills add https://github.com/palicand/nix --skill squash-merge-palicand
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash-merge
Source: https://github.com/palicand/nix/tree/main/skills/squash-merge
Command: npx skills add https://github.com/palicand/nix --skill squash-merge-palicand

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of squashing a GitHub pull request's commit history into a single commit, simplifying the merge process.

Core Features & Use Cases

  • Automated Squash-Merge: Execute a squash-merge command directly through the Skill, without manual intervention.
  • Commit Message Drafting: Generates a draft commit message based on the pull request's title and body, ensuring accurate history.
  • User Approval Required: Always presents a commit message draft to the user for review and approval before merging.

Quick Start

Run the squash-merge skill to squash and merge the current pull request.

Frequently Asked Questions about squash-merge

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

FAQPage Schema
How do I squash and merge a GitHub pull request into a single commit?

To squash and merge a GitHub pull request into a single commit, you can run a command that automatically condenses the commit history. The process generates a draft commit message from the PR title and body for your review.

Can I automatically generate a commit message when squashing a PR?

Yes, you can automatically generate a commit message when squashing a PR. The automation drafts the message directly from the pull request's existing title and body to ensure accurate project history before merging.

Do I need the GitHub CLI to squash-merge a pull request?

Yes, you need the GitHub CLI installed to squash-merge a pull request using this method. The process relies on GitHub API access facilitated through the CLI to automate the commit history consolidation.

Does squashing a PR require manual approval of the commit message?

Yes, squashing a PR requires manual approval of the commit message. The system always presents a drafted commit message for your explicit review and confirmation before finalizing the merge.

What is the best way to clean up commit history before merging a pull request?

The best way to clean up commit history before merging a pull request is to squash the commits into a single entry. This simplifies the merge process and keeps the main branch history linear and readable.

Why should I squash commits when merging a GitHub pull request?

You should squash commits when merging a GitHub pull request to consolidate fragmented development history into a single, coherent commit. This simplifies the main branch and makes future debugging easier.