Skip to content
Back to skills

Rewrite Git History To Purge Secrets Binaries Or Accidental Paths Before Sharing A Repo

ASecurity

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.

  • 36 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 2, 2026
ai-agentspythongogitsecuritydocumentation

Security analysis

A100/100

Scanned June 2, 2026

npx -y skills add agentskillexchange/skills --skill rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rewrite Git History To Purge Secrets Binaries Or Accidental Paths Before Sharing A Repo?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rewrite Git History To Purge Secrets Binaries Or Accidental Paths Before Sharing A Repo
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agentskillexchange-rewrite-git-history-to-purge-secrets-binaries-or-a/badge)](https://www.skillsdirectory.com/skills/agentskillexchange-rewrite-git-history-to-purge-secrets-binaries-or-a)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "Rewrite Git history to purge secrets, binaries, or accidental paths before sharing a repo"
slug: "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."
github_stars: 12127
verification: "security_reviewed"
source: "https://github.com/newren/git-filter-repo"
author: "newren"
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

Use the upstream install or setup path that matches your environment:
- git clone file://$(pwd) newcopy

Requirements and caveats from upstream:
- [Prerequisites](#prerequisites)
- filter-repo requires:
- is all contained in a single-file python script named

Basic usage or getting-started notes:
- [Simple example, with comparisons](#simple-example-with-comparisons)
- git >= 2.36.0
- python3 >= 3.6

- Source: https://github.com/newren/git-filter-repo
- Extracted from upstream docs: https://raw.githubusercontent.com/newren/git-filter-repo/HEAD/README.md

## 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/)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.