Cleaning up a local repo:

git rebase -s ours -i --autosquash HEAD~20

Allowing the remote to be clobbered:

git config receive.denyNonFastForwards false

Pushing from local repo:

git push --force

Safe-guarding the remote once again:

git config receive.denyNonFastForwards true

In case you are rebasing an ikiwiki, you want to clobber the local checkout on your server, as well:

git remote update && git reset --hard @{u}

Done.