https://git-scm.com/docs/git-filter-branch
But this will sever history with all cloned copies, much like rebasing master would.