It's worth pointing out that that the Deutsche Bahn (German Rail) has been providing this sort of service for at least a decade (I remember seeing them parked outside of train stations in 2008):
There are many such bike sharing services in Germany like LidleBike [0] and NextBike [1]. But, I think it's relatively much more expensive than owning your own bike.