{"id":"6e829dee-9988-4261-b27c-e579119eb29a","shortId":"p7Tx38","kind":"skill","title":"Rewrite Git history to purge secrets, binaries, or accidental paths before sharing a repo","tagline":"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, an","description":"# Rewrite Git history to purge secrets, binaries, or accidental paths before sharing a repo\n\nUse 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.\n\n## Prerequisites\n\ngit >= 2.36.0, python3 >= 3.6\n\n## Installation\n\nUse the upstream install or setup path that matches your environment:\n- git clone file://$(pwd) newcopy\n\nRequirements and caveats from upstream:\n- [Prerequisites](#prerequisites)\n- filter-repo requires:\n- is all contained in a single-file python script named\n\nBasic usage or getting-started notes:\n- [Simple example, with comparisons](#simple-example-with-comparisons)\n- git >= 2.36.0\n- python3 >= 3.6\n\n- Source: https://github.com/newren/git-filter-repo\n- Extracted from upstream docs: https://raw.githubusercontent.com/newren/git-filter-repo/HEAD/README.md\n\n## Documentation\n\n- https://github.com/newren/git-filter-repo\n\n## Source\n\n- [Agent Skill Exchange](https://agentskillexchange.com/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo/)","tags":["rewrite","git","history","purge","secrets","binaries","accidental","paths","before","sharing","repo","skills"],"capabilities":["skill","source-agentskillexchange","skill-rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo","topic-agent-skills","topic-ai-agents","topic-ai-tools","topic-awesome-list","topic-claude-code","topic-codex","topic-cursor","topic-llm","topic-mcp","topic-npx-skills","topic-openclaw","topic-skills-catalog"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/agentskillexchange/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add agentskillexchange/skills","source_repo":"https://github.com/agentskillexchange/skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,248 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:12:08.220Z","embedding":null,"createdAt":"2026-05-18T13:18:54.465Z","updatedAt":"2026-05-18T19:12:08.220Z","lastSeenAt":"2026-05-18T19:12:08.220Z","tsv":"'/newren/git-filter-repo':199,210 '/newren/git-filter-repo/head/readme.md':206 '/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo/)':217 '2.36.0':135,193 '3.6':137,195 'accident':9,74 'agent':22,43,87,108,212 'agentskillexchange.com':216 'agentskillexchange.com/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo/)':215 'analyz':44,109 'bad':39,104 'basic':176 'binari':7,35,72,100 'build':47,112 'caveat':156 'checklist':58,123 'clean':54,119 'cleanup':132 'clone':63,128,151 'command':50,115 'commit':36,101 'comparison':186,191 'contain':167 'doc':203 'document':207 'downstream':131 'environ':149 'exampl':184,189 'exchang':214 'extract':200 'file':172 'filter':18,83,162 'filter-repo':161 'follow':56,121 'follow-up':55,120 'forc':61,126 'force-push':60,125 'get':180 'getting-start':179 'git':2,17,67,82,134,150,192 'git-filter-repo':16,81 'github.com':198,209 'github.com/newren/git-filter-repo':197,208 'histori':3,28,68,93 'huge':34,99 'instal':138,142 'leak':31,96 'leav':52,117 'match':147 'name':175 'need':23,88 'newcopi':153 'note':182 'path':10,75,145 'prerequisit':133,159,160 'problem':46,111 'purg':5,70 'push':62,127 'pwd':152 'python':173 'python3':136,194 'raw.githubusercontent.com':205 'raw.githubusercontent.com/newren/git-filter-repo/head/readme.md':204 'repo':14,19,79,84,163 'repositori':27,92 'requir':154,164 'reset':64,129 'rewrit':1,26,49,66,91,114 'script':174 'secret':6,32,71,97 'setup':144 'share':12,77 'simpl':183,188 'simple-example-with-comparison':187 'singl':171 'single-fil':170 'skill':213 'skill-rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo' 'sourc':196,211 'source-agentskillexchange' 'split':41,106 'start':181 'subtre':40,105 'surgic':25,90 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-tools' 'topic-awesome-list' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-llm' 'topic-mcp' 'topic-npx-skills' 'topic-openclaw' 'topic-skills-catalog' 'upstream':141,158,202 'usag':177 'use':15,80,139","prices":[{"id":"16cd5ad7-3b72-49dc-8b68-8e2ad753707c","listingId":"6e829dee-9988-4261-b27c-e579119eb29a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"agentskillexchange","category":"skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:18:54.465Z"}],"sources":[{"listingId":"6e829dee-9988-4261-b27c-e579119eb29a","source":"github","sourceId":"agentskillexchange/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo","sourceUrl":"https://github.com/agentskillexchange/skills/tree/main/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo","isPrimary":false,"firstSeenAt":"2026-05-18T13:18:54.465Z","lastSeenAt":"2026-05-18T19:12:08.220Z"}],"details":{"listingId":"6e829dee-9988-4261-b27c-e579119eb29a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"agentskillexchange","slug":"rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo","github":{"repo":"agentskillexchange/skills","stars":8,"topics":["agent-skills","ai-agents","ai-tools","awesome-list","claude-code","codex","cursor","llm","mcp","npx-skills","openclaw","skills-catalog"],"license":"mit","html_url":"https://github.com/agentskillexchange/skills","pushed_at":"2026-05-18T19:02:17Z","description":"The open catalog of AI agent skills — 2,000+ security-scanned skills for Claude Code, Cursor, Codex, and more.","skill_md_sha":"82bbf9ab69a35cb7737cf809b035a30e64a19fd8","skill_md_path":"skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/agentskillexchange/skills/tree/main/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"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."},"skills_sh_url":"https://skills.sh/agentskillexchange/skills/rewrite-git-history-to-purge-secrets-binaries-or-accidental-paths-before-sharing-a-repo"},"updatedAt":"2026-05-18T19:12:08.220Z"}}