Yes, I totally agree, I didn't meant github/gitlab specifically, but any external git repository.
I thought of a hosted theme store concept something like WordPress, but "sources" concept seems interesting, and that can help us implement it with less maintenance. But I think we will have to define and implement some standards, so that we can fetch details of the theme and provide a very much WP like browsing interface (with filtering and searching).
The idea of versioning is pretty complex, and I am still figuring ways out. I wished to implement somewhat advanced versioning like git, with each file actions forming a commit, and one can use revert to go back. Not sure of the implementation part yet, though.