News for hackers. Stuff that matters.
Re:Why Git Is Hard by sshine on Saturday October 07, 2023 @05:35AM (#37800332)
Check out “git filter-repo”.

It’s safer, faster, easier to use.

Oh, and not built-in.

Re:Why Git Is Hard by civopsec on Saturday October 07, 2023 @05:38AM (#37800342)
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.

Re:Why Git Is Hard by sshine on Saturday October 07, 2023 @05:58AM (#37800431)
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.

Re:Why Git Is Hard by civopsec on Saturday October 07, 2023 @06:01AM (#37800441)
> Even recommending filter-branch is just aligning the footgun slightly.

Who recommended it?

Re:Why Git Is Hard by sshine on Saturday October 07, 2023 @06:09AM (#37800463)
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”.

Re:Why Git Is Hard by civopsec on Saturday October 07, 2023 @06:19AM (#37800511)
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.