# Why git filter-repo is the Superior Replacement for git filter-branch

Original title: Quickly rewrite Git repository history

> Hacker News story 48986703 · language: en · submitted 2026-07-21
> Web version: https://zeli.app/story/48986703
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 62 · by [modinfo](<https://news.ycombinator.com/user?id=modinfo>) · 💬 13
[original](<https://github.com/newren/git-filter-repo>) · [HN discussion](<https://news.ycombinator.com/item?id=48986703>)

## Summary

I built git filter-repo to solve the severe performance issues and safety risks found in git filter-branch. This versatile tool offers far more capabilities for rewriting Git history while remaining easy to use. Now officially recommended by the Git project, it serves as both a simple command-line utility and a library for creating custom history rewriting tools, effectively replacing older solutions like BFG Repo Cleaner.

## Key quote

> filter-branch is extremely to unusably slow for non-trivial repositories and riddled with gotchas that can silently corrupt your rewrite.

## HN discussion (13 comments)

### [wincent](<https://news.ycombinator.com/item?id=49032575>)

> By Elijah Newren, author of Git's newer mergeort merge algorithm. ("ort" or "ostensibly recursive's twin" replaced the older recursive merge algorithm.)

### [ifh-hn](<https://news.ycombinator.com/item?id=49034002>)

> I'm not a git user (it's true, I'm not a professional dev and use fossil for my pet projects) so honest question: why would you want to rewrite your history?

### [sleepytoken](<https://news.ycombinator.com/item?id=49031617>)

> This tool really helped when I was migrating code across repositories. Thanks a lot!

---

## Cite

- Page: https://zeli.app/story/48986703
- Date: 2026-07-21
- Source: github.com (https://github.com/newren/git-filter-repo)
- Hacker News: https://news.ycombinator.com/item?id=48986703

## Other languages

- zh: https://zeli.app/zh/story/48986703 · markdown: https://zeli.app/zh/story/48986703.md
- ja: https://zeli.app/ja/story/48986703 · markdown: https://zeli.app/ja/story/48986703.md
- ko: https://zeli.app/ko/story/48986703 · markdown: https://zeli.app/ko/story/48986703.md
- de: https://zeli.app/de/story/48986703 · markdown: https://zeli.app/de/story/48986703.md
- es: https://zeli.app/es/story/48986703 · markdown: https://zeli.app/es/story/48986703.md
