Consider Fossil[1], which packages the entire repository state—code history, wiki, tickets, forum—into a single file, and that state gets cloned.
When/if you need to change hosting providers, you get to lose zero data in Fossil because of it.
I considered Fossil several years ago and while it's really cool (everything being integrated is awesome), I don't like Fossil from a philosophical perspective. There's no way to clean up history, it preserves everything as is. If that's what you want, great, but as part of my git workflow I like to mess around and then go back and clean up and organize my commits before pushing them.
I love fossil. Something about it's opinionated workflow that matches what I think. But
network effects. I just can not bring my team to use fossil. They have to share code with others. Other departments. And everyone (99%+) uses git. It just feels like a disservice to force them to use fossil. It is a catch-22.
It is similar to so many other things in the tech space. Trying to get fellow developers to use functional style idioms. Trying to enforce immutability. It is like something big (like a facebook or google project) has to force the community to get on board.