Skip to content

Commit 274e66b

Browse files
committed
Recommend filter repo instead of filter branch
1 parent 025d7e5 commit 274e66b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

book/07-git-tools/sections/rewriting-history.asc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,13 @@ The command is `filter-branch`, and it can rewrite huge swaths of your history,
304304
However, it can be very useful.
305305
You'll learn a few of the common uses so you can get an idea of some of the things it's capable of.
306306

307+
[CAUTION]
308+
====
309+
`git filter-branch` has many pitfalls, and is no longer the recommended way to rewrite history.
310+
Instead, consider using `git-filter-repo`, which is a Python script that does a better job for most applications where you would normally turn to `filter-branch`.
311+
Its documentation and source code can be found at https://github.com/newren/git-filter-repo[].
312+
====
313+
307314
[[_removing_file_every_commit]]
308315
===== Removing a File from Every Commit
309316

0 commit comments

Comments
 (0)