#achievement unlocked. Finally solved a real problem with #git 'filter-repo'. Tried some manual approaches first but remembered filter-branch and found in the docs that it is deprecated in favour of filter-repo. Checked and installed git-filter-repo in #debian #trixie. Skimming the documentation for a few minutes indicated how it could possibly work, and sure enough on the first attempt:
New history written in 0.03 seconds; now repacking/cleaning...
This is real crazy stuff. 🙏


