git-filter-repo
Quickly rewrite git repository history
Decision gist · record as of 2026-08-14
Yes. It is actively maintained, has no dependencies, installs easily, and solves a real problem (git history rewriting) that git filter-branch handles poorly. The MIT license is permissive. No known vulnerabilities. Recommended by the git project itself as the successor to filter-branch. Install if you need to rewrite git history or build tools that do so.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires git >= 2.22.0 (some features need >= 2.24.0) and Python 3 >= 3.6; git must be installed and in PATH.
- Low friction: pure Python wheel with no runtime dependencies.
- Active maintenance (last commit 2026-07-09) and stable release cycle.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute freely with minimal restrictions. No copyleft obligations.
last release 2024-12-04 (618 days) · last repo commit 2026-07-09 · 13,130 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 940,506 downloads/mo, #4,681 on PyPI
Alternatives
Verify before relying
pip install git-filter-repo
git filter-repo --path src/ --path-rename src/:my-module/- Whether the library API (for creating custom history rewriting tools) is stable and well-documented for programmatic use beyond the CLI.
- Performance characteristics on very large repositories (commit count, object count) compared to stated claims.
What it is and what it does
git-filter-repo is a command-line tool and Python library for rewriting git repository history. It handles tasks like removing files, renaming paths, extracting subdirectories, and cleaning sensitive data across all commits. The tool is designed as a modern replacement for git filter-branch, which the git project itself now recommends against due to poor performance and safety issues.
Most users interact with it as a CLI tool with flags for common rewrites. For specialized needs, the package also exposes a library interface so developers can build custom history rewriting tools. It requires git >= 2.22.0 and Python >= 3.6, and has no external Python dependencies beyond the standard library.
Use it for
- Remove accidentally committed secrets, large files, or sensitive data from all commits in a repository's history.
- Extract a subdirectory from a monorepo into a standalone repository with clean history.
- Rename file paths or directory structures across an entire repository's commit history.
- Migrate repositories between hosting platforms while cleaning up or restructuring history.
- Build a custom history rewriting tool by leveraging the filter-repo library for domain-specific transformations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
It is actively maintained, has no dependencies, installs easily, and solves a real problem (git history rewriting) that git filter-branch handles poorly. The MIT license is permissive. No known vulnerabilities. Recommended by the git project itself as the successor to filter-branch. Install if you need to rewrite git history or build tools that do so.
Install
git-filter-repo on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Active maintenance (last commit 2026-07-09) and stable release cycle. Supports Python 3.6 through 3.12 and PyPy.
Requires git >= 2.22.0 (some features need >= 2.24.0) and Python 3 >= 3.6; git must be installed and in PATH.
License in practice
MIT license (permissive): you can use, modify, and distribute freely with minimal restrictions. No copyleft obligations.
Quickstart
pip install git-filter-repo
git filter-repo --path src/ --path-rename src/:my-module/
Verify before relying
- Whether the library API (for creating custom history rewriting tools) is stable and well-documented for programmatic use beyond the CLI.
- Performance characteristics on very large repositories (commit count, object count) compared to stated claims.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 618 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 940,506 / month, #4,681 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: git_filter_repo-2.47.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “git history rewriting”
- git-filter-repoRewrites git repository history efficiently, replacing files,…
- PyDrillerPyDriller extracts commit history, developer metadata, modified…
- gitchangelogGenerates a formatted changelog from git commit history, filtering…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also giturlparse · ripgrep · detect-secrets · nbstripout · bc-detect-secrets · lxml-html-clean · lintrunner · ast-grep-cli · gron · igittigitt