commit-refinement

Reorganize, squash, and split commits into coherent narratives via interactive rebase.

Updated Nov 30, 2018
One-click install
npx skills add https://github.com/guygrigsby/dotfiles --skill commit-refinement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-refinement
Source: https://github.com/guygrigsby/dotfiles/tree/main/opencode/skills/commit-refinement
Command: npx skills add https://github.com/guygrigsby/dotfiles --skill commit-refinement

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Clean messy commit histories into coherent narratives.

Core Features & Use Cases

  • Narrative-driven restructuring: reorganize, squash, and split commits to tell a single, clear story.
  • Atomic commits: ensure each commit stands alone and builds, enabling reliable bisects and rollbacks.
  • PR-ready messages: craft conventional, contextual commit messages aligned with project guidelines.
  • Guided workflows: follow best practices with step-by-step directions for planning and executing interactive rebases.

Quick Start

Outline a plan for refining a branch, then perform an interactive rebase to produce a concise, logical history.

Frequently Asked Questions about commit-refinement

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

FAQPage Schema
How do I clean up a messy git history before merging a pull request?

To clean up a messy git history before merging, you can reorganize, squash, or split commits to create a single clear narrative. This ensures your feature branch tells a logical story before sharing.

What is the best way to rewrite commit messages to follow conventional guidelines?

Rewriting commit messages for conventional guidelines involves interactive rebasing to alter existing messages. This enforces contextual, standardized commit messages aligned with your project's specific formatting rules.

How do I squash and split commits to ensure each commit builds independently?

To ensure each commit builds independently, you can squash and split commits during an interactive rebase. This creates atomic commits that enable reliable bisects and safe rollbacks.

Can I reorganize feature branch commits into a logical story before sharing?

Yes, you can reorganize feature branch commits into a logical story using an outline-driven interactive rebase workflow. This allows you to sequence changes coherently before pushing to a remote repository.

Does interactive rebasing work for preparing a PR with atomic commits?

Yes, interactive rebasing works for PR preparation by restructuring commits into atomic units. This guarantees each commit stands alone and builds successfully, enabling reliable bisects and rollbacks.

When should I not rewrite my git commit history?

You should not rewrite git commit history on branches that have already been shared or merged with others. Rewriting shared history causes divergent trees and conflicts for other contributors.