Sure, they could setup a selfhosted GitLab and mirror repos, but doing so would severely hurt them.
Yeah it's very difficult to "block Google" and they are "afraid are afraid to ban" Gmail.
Why makes you think that a gov use tanks against its own people have anything to fear?