Hacker News new | past | comments | ask | show | jobs | submit login

Check out “git filter-repo”.

It’s safer, faster, easier to use.

Oh, and not built-in.




The rule was to not use any external tools so it doesn't qualify.

But you're right. filter-repo is a great tool. You can even use pleasant Python "callbacks" instead of a hodge-podge of env variables and shell snippets.


The rule is arbitrary and unhelpful and only helps drive a rhetorical point, not actual advice: you really don’t want to do this without a tool as safe and fast as filter-repo. Even recommending filter-branch is just aligning the footgun slightly.

If a point is to be made that confirms OP: removing a file completely isn’t trivial, and thinking one did when one didn’t it is too easy.


> Even recommending filter-branch is just aligning the footgun slightly.

Who recommended it?


It ships with git, so without extra tools, it is the implied solution to OP’s question, and the default choice for many.

I’m not saying they recommend it, as the question drives a rhetorical point. But it’s worth mentioning “git filter-repo” as a solution you will not stumble into as easily as the more difficult, brittle and slow “git filter-branch”.


What I said in my one-sentence-reply is that there are no non-deprecated, built-in tools that helps with this task in a streamlined manner. Which means by extension that it is not a trivial task.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: