Git History Surgeon / Git 历史记录手术刀

Interactive tool to rewrite, squash, split, or purge sensitive data from Git history safely. / 交互式安全重写、压缩、拆分或清除 Git 历史中的敏感数据。

Install

openclaw skills install @kingaiwork/git-history-surgeon

🩺 Git History Surgeon / Git 历史记录手术刀

Interactive tool to rewrite, squash, split, or purge sensitive data from Git history safely. / 交互式安全重写、压缩、拆分或清除 Git 历史中的敏感数据。

🦁 由 KingAI.Work 出品 — 智能进化|vip@kingai.work


Features / 功能特性

• Rewrite entire Git commit history interactively with safety checkpoints / 交互式重写整个 Git 提交历史,每步安全确认防止数据丢失 • Split monolithic commits into logical chunks to restore project clarity / 拆分巨型提交为逻辑片段,让项目演进史回归清晰可追溯 • Purge sensitive data (API keys, passwords) from all commits and branches / 一键清除所有分支和提交中的敏感数据(API密钥、密码),不留痕迹 • Preview history transformations before applying them permanently / 应用前预览历史变更效果,避免误操作影响团队协作 • Advanced commit graph manipulation with granular author/date editing / 高级提交图编辑,支持精细调整作者和时间戳(Pro专属) • Automated CI/CD pipeline integration for pre-deployment history sanitization / 自动集成CI/CD流水线,部署前批量清理历史敏感字段(Pro专属)

Quick Start / 快速开始

bash
git-history-surgeon --repo ./project --purge "API_KEY=*" --all-branches Safely removes all occurrences of API keys from every commit across all branches, with automatic backup. / 安全移除所有分支中所有提交里的API密钥,并自动创建备份。 

Use Cases / 使用场景

• Accidentally committed API keys to a public repo / 开发者不慎将生产环境API密钥提交到公开仓库,需要从整个历史中彻底抹除而不破坏协作分支 • Monolithic commit that mixed feature work with unrelated refactoring / 大型提交混合了新功能和代码重构,需要拆分为多个语义清晰的提交以通过代码审查 • Onboarding a large legacy codebase with messy history / 接手大型遗留项目时历史杂乱堆叠,需要压缩无意义提交并重建干净的演进脉络

Plans / 方案对比

FeatureFreePro
Core / 核心功能
Batch / 批量处理
AI / AI 增强
Support / 支持CommunityPriority

• Unlock bulk operations across 100+ repositories simultaneously • 批量处理100+仓库的同步操作,从手工劳动解放出来 • Gain real-time collaboration safety locks for team history rewrites • 团队重写历史时自动启用协作安全锁,防止同事的变更被意外覆盖 • Access enterprise-grade audit trails and rollback guarantees • 获得企业级操作审计日志与自动回滚保障,合规无忧\n\n

Part of the KING AI Ecosystem — kingai.work