squash-merge

Squash merge GitHub pull requests via gh CLI with conventional commit messages.

Updated Nov 23, 2022
One-click install
npx skills add https://github.com/tjmgregory/.dotfiles --skill squash-merge-tjmgregory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash-merge
Source: https://github.com/tjmgregory/.dotfiles/tree/main/agents/skills/squash-merge
Command: npx skills add https://github.com/tjmgregory/.dotfiles --skill squash-merge-tjmgregory

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the process of squash merging GitHub pull requests, ensuring that the resulting commit message is well-crafted, informative, and adheres to project conventions.

Core Features & Use Cases

  • Automated Commit Message Generation: Creates a concise subject line and a detailed body summarizing all changes in the PR.
  • Commit Convention Adherence: Detects and follows project-specific commit styles (e.g., Conventional Commits).
  • Use Case: When you've finished a feature branch and are ready to merge, use this Skill to squash all your commits into a single, meaningful commit that clearly explains the changes and their purpose.

Quick Start

Use the squash-merge skill to squash merge the current pull request with a conventional commit message.

Frequently Asked Questions about squash-merge

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

FAQPage Schema
How do I squash merge a GitHub pull request with a conventional commit message?

To squash merge a GitHub pull request with a conventional commit message, the skill uses the gh CLI to merge the PR while automatically generating a comprehensive commit message that summarizes all branch changes according to repository conventions.

Can I automatically generate a commit message that adheres to my project's conventions when merging a PR?

Yes, you can automatically generate a commit message that adheres to project conventions when merging a PR, as the skill detects specific commit styles like Conventional Commits and crafts the subject and body content based on the PR details and commit history.

What's the best way to summarize all branch changes into a single commit when finalizing a feature branch?

The best way to summarize branch changes into a single commit when finalizing a feature branch is using a squash merge, which combines all commits into one meaningful commit with a concise subject line and a detailed body explaining the changes.

Do I need the gh CLI installed to squash merge pull requests from the command line?

Yes, you need the gh CLI installed and configured to squash merge pull requests from the command line, because the skill relies on this dependency to interact with GitHub, identify commit conventions, and finalize the merge.

Why does my squash merge commit message not match my repository's commit conventions?

Your squash merge commit message may not match repository conventions if the commit history or PR details are unclear, but this skill specifically identifies your project's commit conventions and generates subject and body content designed to follow them.

When do I need to use a squash merge instead of a standard merge for my pull request?

You need to use a squash merge instead of a standard merge when you want to finalize a feature branch by combining all incremental commits into a single, meaningful commit that clearly explains the changes and their purpose without cluttering the main history.