Ideally something like IPNS to have a mutable ref based on (repo, pubkey, branch) to resolve a commit hash, a DHT for who has what commit hashes, and then just p2p transfers. You could still have a github or gitlab for issues and CI, but code (and maybe issues) could all be p2p like git is already designed for. Your forge could also act as a peer for code cloning, of course.
The complexity is in locating what is already a distributed database item (git is fundamentally already designed that way), just using a protocol meant for that. Basically just support `git clone` with e.g. IPFS URIs.
I think the clear reason is even with their unreliability, the cost of migrating off of GitHub for _most_ places is not worth it, and so companies don't / won't (yet)
This bugs me so much. Management decides what is reasonable cost of service and the employees have to deal with all bullshit coming from that product. And you can't really escape it. Maybe the real moat was enterprise deals we made along the way.