Monorepo: How to keep your history in order

How to move lots of separate repositories into one repo while keeping everything in order