Quickly rewrite git repository history (filter-branch replacement)
open sourceMITself-hostablefree
git filter-repo rewrites git history: remove a file or a leaked secret from every commit, move a subdirectory into its own repository, rename paths, rewrite author emails or strip large blobs. The git project recommends it instead of git filter-branch, which is far slower and harder to use. Most people use it as a command, and its Python core is a library for writing custom history rewriting tools. It's MIT licensed (also available under git's own licences).
Ways to install
Package managers
Problems it solves
- someone committed a password and I need it gone from the whole history
- split one folder of our monorepo into its own repo with its history
- remove a huge file that was committed years ago and bloats every clone
- git filter-branch is painfully slow and warns me not to use it
- change the author email on all my old commits
- merge two repos and move one into a subdirectory with history
Features
- path filtering and renaming
- blob size stripping
- text replacement across history
- mailmap rewriting
- Python library
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
