Using technology/standard/service provided by US based private companies introduce risks. We are not just 'use/steal' these technologies/standard, we also heavily invest, enrich ecosystem, build services on top of them, that means if US government kill it at any time, those investments may lost too.
Based on my experience, Chinese government is so incompetent that it can't create an alternative, or initiate one, at least in the Internet industry, also China have to do business with other countries(other than US), so clearly create a private tech/standard stack is not an option. That means big companies like Huawei/Tencent/Alibaba/Baidu will start/continue to support&invest more in true open technologies, like linux/risk-v, perhaps favor true oss communities rather than google/fb owned oss projects(like android/arm/tensorflow).
Companies in countries other than China and US should also think about this risk, today US is banning Huawei, you may think it's all because China is evil, similar things happened for Japan 2 decades ago, and may still possible for India(if its population and GDP growth rate continues).
If Github were to be rebuilt in China, I do not believe that it would be redesigned with decentralization as a guiding principle. The Government would view this as a great opportunity to 'fix' issues with the current setup. The replacement would be receive funding from the Government and it would be designed with national interests (as defined by the Government) forefront in mind.
The good news is that according to @decster in a cousin comment, it may be the case that the Government is sufficiently incompetent that this may not be a risk. On the other hand, incompetence in Government hasn't stopped bad ideas from being forced on people in the past, so...