Prerequisites
Before installing git-filter-repo, ensure you have:- Git >= 2.36.0
- Python >= 3.6
Installation Methods
- Simple (Recommended)
- Package Manager
- PyPI (pipx/uv)
- Makefile
The simplest way to install git-filter-repo is to download the single Python script.
Advanced Installation (For Library Use)
If you want to use git-filter-repo as a Python library or use contrib scripts:Platform-Specific Notes
Windows Users
Windows Users
Windows can present some unique challenges:
Non-functional Python Stub
Windows sometimes ships with a non-functional Python stub that can cause the application to hang. Install Python from the Microsoft Store.Python Executable Name
If your Python executable is namedpython instead of python3, you have two options:- Edit the first line of
git-filter-repoto usepythoninstead ofpython3 - Use the full form in commands:
python git-filter-repoinstead ofgit filter-repo
Symlink Issues
Ifgit_filter_repo.py appears as a regular file with just one line instead of a proper symlink, delete it and create a copy instead:Verification
Verify your installation by running:What Gets Installed
A complete installation includes:git-filter-repo
The main executable script. Required for all use cases.
git_filter_repo.py
Python library module. Optional, needed for using filter-repo as a library.
git-filter-repo.1
Man page. Optional, enables
git filter-repo --help on Linux/Mac.git-filter-repo.html
HTML documentation. Optional, enables
git filter-repo --help on Windows.Next Steps
Quickstart
Try your first repository filtering
Analyzing Repositories
Analyze your repo to decide what to filter
