So, ultimately, you always end up with somebody providing the convenience of not throwing your data away for a fee. Github and Gitlab seem to be the popular options for that. Gitlab is actually open source and you can self host it if you want and many do. But the reason they have a nice valuation is that they have lots of customers that prefer them to do it.
Given that it's MIT Licensed, you can even do that and offer it as a service probably (Amazon, there's a nice idea for you :-) ).