For me it was for removing some credentials from a repo.
I tried rebasing and ran into a ton of seemingly unrelated conflicts along the way when trying to rebase --continue.
Don't bother attempting to rebase yourself, use the tool called BFG (brew install bfg) on mac.