Change string in file through whole git history, filter-branch is not rewriting the file

86 views Asked by At
git filter-branch --tree-filter "sed -i 's/old/new/g' src/foo/bar.js &> /dev/null"

bfg repo cleaner didn't help either and it is unclear how to use it.

1

There are 1 answers

0
Sasha Tobin On BEST ANSWER

BFG repo cleaner helped me, I misunderstood replace text command. It turns out it takes file with data to remove as first argument