Use git-filter-repo when an agent needs to surgically rewrite repository history after a leaked secret, a huge binary commit, or a bad subtree split. The agent analyzes the problem, builds the rewrite command, and leaves a clean follow-up checklist for force-push, clone reset, and downstream cleanup.
Scanned 9/12/2026
Install to Claude Code
npx -y skills add aibot88/sec_skill_store --skill rewrite-git-history-to-purge-secrets-binaries-or-accidental-path --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Rewrite Git History To Purge Secrets Binaries Or Accidental Path?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aibot88-rewrite-git-history-to-purge-secrets-binaries-or-a)More formats (shields.io, HTML) on the badges page.
---
title: "Rewrite Git history to purge secrets, binaries, or accidental paths before sharing a repo"
description: "Use git-filter-repo when an agent needs to surgically rewrite repository history after a leaked secret, a huge binary commit, or a bad subtree split. The agent analyzes the problem, builds the rewrite command, and leaves a clean follow-up checklist for force-push, clone reset, and downstream cleanup."
verification: "security_reviewed"
source: "https://github.com/newren/git-filter-repo"
publisher_type: "individual_maintainer"
category:
- "Runbooks & Diagnostics"
framework:
- "Multi-Framework"
tool_ecosystem:
github_repo: "newren/git-filter-repo"
github_stars: 12127
---
# Rewrite Git history to purge secrets, binaries, or accidental paths before sharing a repo
Use git-filter-repo when an agent needs to surgically rewrite repository history after a leaked secret, a huge binary commit, or a bad subtree split. The agent analyzes the problem, builds the rewrite command, and leaves a clean follow-up checklist for force-push, clone reset, and downstream cleanup.
## Prerequisites
git >= 2.36.0, python3 >= 3.6
## Installation
Choose whichever fits your setup:
1. Copy this skill folder into your local skills directory.
2. Clone the repo and symlink or copy the skill into your agent workspace.
3. Add the repo as a git submodule if you manage shared skills centrally.
4. Install it through your internal provisioning or packaging workflow.
5. Download the folder directly from GitHub and place it in your skills collection.
Install command or upstream instructions:
```
Download the git-filter-repo script from the repo, preserve its name, and place it on your PATH
```
## Documentation
- https://github.com/newren/git-filter-repo
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo/)
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!