git-clean-history

Reimplements a Git branch on a fresh branch off main with narrative commit history.

24|3|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/goncalossilva/.agents --skill git-clean-history
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-clean-history
Source: https://github.com/goncalossilva/.agents/tree/main/skills/git-clean-history
Command: npx skills add https://github.com/goncalossilva/.agents --skill git-clean-history

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating a clean, narrative-quality Git commit history for a branch, making it easier for reviewers to understand the evolution of changes.

Core Features & Use Cases

  • Rebase on Main: Recreates the current branch on top of main with a fresh history.
  • Logical Commits: Breaks down complex changes into self-contained, understandable commits.
  • Narrative History: Ensures commit messages tell a clear story of the development process.
  • Use Case: Before submitting a large feature for review, use this skill to organize your commits into logical steps, each with a clear message, making the review process smoother and faster.

Quick Start

Use the git-clean-history skill to reimplement the current branch on a new branch named 'feature-x-clean'.

Frequently Asked Questions about git-clean-history

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

FAQPage Schema
How do I clean up a messy Git commit history before code review?▼

To clean up a messy Git commit history, you can reimplement your branch on a fresh branch off main. This analyzes diffs, plans commit storylines, and recreates work step-by-step with clear messages, making code review smoother.

What is the best way to organize complex feature commits into a narrative history?▼

The best way to organize complex feature commits into a narrative history is by analyzing diffs and planning a commit storyline. This breaks down complex changes into self-contained, understandable commits that tell a clear development story.

How do I rebase a feature branch onto main with logical commits?▼

To rebase a feature branch onto main with logical commits, recreate the current branch on a fresh branch off main. The process plans commit storylines and verifies the final state matches your source branch exactly while building a clean history.

Can I rewrite branch history without losing my current source code changes?▼

Yes, you can rewrite branch history without losing changes because the process verifies the final state matches the source branch exactly. It recreates the work step-by-step on a new branch, ensuring no code is lost.

When do I need to rewrite my Git branch history?▼

You need to rewrite your Git branch history before submitting a large feature for review. Organizing commits into logical steps with clear messages makes the review process smoother and faster for reviewers.