Thing is that in the big picture, it's not just that China is building a replacement for GitHub. China is building a replacement for everything that matters and accelerates their transition to be the Super Power. And they have been doing so for last 30 years, just that now it's hitting a critical mass and world is waking up to it.
And I think, we, The West, have been getting it wrong. We are looking at China like a jealous neighbor, pushing back politically, through regulations and sanctions. Unfortunately that can only go so far. Thing is China is obsessed (and determined) about progressing and West is obsessed about protecting what it already has.
America needs to be obsessed about creating and innovating. Hard creation and innovation on a scale never seen before - like 1000x the man-on-the-moon scale.