git-rewrite-history

Plan and approve git history rewrites with mandatory dry-run steps.

31|6|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/MatiasComercio/agentic-config --skill git-rewrite-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-rewrite-history
Source: https://github.com/MatiasComercio/agentic-config/tree/main/core/skills/git-rewrite-history
Command: npx skills add https://github.com/MatiasComercio/agentic-config --skill git-rewrite-history

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk and complexity of Git history operations, ensuring your repository stays clean and professional without manual command-line work.

Core Features & Use Cases

  • Safe History Rewriting: Amend commits, squash multiple changes, reword messages, and update tags with mandatory dry-run validation.
  • Use Case: Imagine you need to combine 5 messy commits into one clean commit before pushing to main. This Skill creates a detailed plan, backs up your work, and waits for explicit approval before executing any changes.

Quick Start

Rewrite the last 3 commits to combine them into one with a clear message.

Frequently Asked Questions about git-rewrite-history

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

FAQPage Schema
How do I safely rewrite Git history without losing work?

Git history rewriting with mandatory dry-run validation lets you amend, squash, and reword commits safely. The Skill creates a detailed plan, backs up your repository, and requires explicit approval before applying any changes, eliminating the risk of irreversible mistakes.

Can I combine multiple commits into one before pushing to a remote branch?

Yes, you can squash multiple commits into a single commit with a clear message. The Skill handles the entire workflow—from planning to backup to execution—across local and remote branches with mandatory dry-run validation.

What's the safest way to amend commit messages in my repository?

Rewriting commit messages with amend operations is safe when done with explicit dry-run proposals and backup creation. This Skill automates that process, showing you the exact changes before they're applied and preserving tag annotations throughout.

How do I force push changes after rewriting history without breaking my repository?

Force push after history rewriting requires careful planning and backup. This Skill manages the entire operation with mandatory dry-run approval, backup retention, and explicit confirmation steps to prevent accidental data loss.

Can I update Git tags while rewriting history safely?

Tag updates during history rewriting are supported with full annotation preservation. The Skill includes tag updates in its planning workflow, creates backups, and requires approval before executing any changes to ensure your tags remain intact.

What happens if I need to undo a history rewrite after it's applied?

The Skill creates backups before any destructive operation, allowing recovery if needed. Mandatory dry-run validation and explicit approval steps let you review the exact changes and abort before they're committed to your repository.