Oh no, my anonymous github account will be hacked!
Seriously, this shit doesn't happen. There are too many people doing too many things in the world for a government across the world to do much of anything to anyone.
I am not ever going to live my life in fear of something dumb, like that. I am going to criticize and offend whatever world governments deserve to be offended.
If they don't like it, they can send their secret james bond assassins after me for posting stuff on the internet that hurt their feelings.
China would most definitely retaliate; first by threatening and attacking GitHub, and if that didn't work then block the site completely. This would result in the Chinese companies/government losing billions, their tech progress could be severely hurt, and they would risk enraging the Chinese dev community.
It's very naive to think that the people responsible for creating and spreading this repo wouldn't be attacked, and while you might succeed in maintaining anonymity of the GitHub account (risky assumption), you most certainly wouldn't be able to remain anonymous when spreading it on Chinese services like QQ/WeChat/Weibo/etc (at least if an individual were to attempt to do this).
https://en.wikipedia.org/wiki/Censorship_of_GitHub
https://en.wikipedia.org/wiki/GreatFire
China did not win. Github did not get permanently blocked. They got DDoS for a week or something, but ultimately did not lose "billions".
The reason these temporary blocking attempts and attacks fail, is because github is a critical piece of infrastructure, and if a country blocks it, then it will suffer massive economic damage, and be forced to reconsider the block.
I very much hope that China continues to waste their time on these attacks. They will fail like they failed before. The more desperate they are, the more that they thrash around and fail to achieve any results, the more that people realize how little power they actually have to stop people from spreading information.
"This would result in the Chinese companies/government losing billions, their tech progress could be severely hurt, and they would risk enraging the Chinese dev community."
Good. Maybe then the Chinese citizens will do something about it. Chinese censorship mostly only hurts their own people (and by extension, it would then hurt the people in power), which will hurt them in the long term.
"It's very naive to think that the people responsible for creating and spreading this repo wouldn't be attacked"
The GreatFire people seem to be doing just fine, despite how much they have pissed off the chinese government. So empirically, as proven by facts, you are wrong.
What I suggested and GreatFire is miles apart. Moreover, I'm not saying that throwing up some wikipedia articles about Tiananmen, Chairman Mao, etc. will result in China being forced to block GitHub or attack you. The path to success is to have the repo spread to tens of millions of Chinese locals. Regular people, not just the tech savvy that knows what a VPN is. It certainly won't be easy, especially considering they can easily shadowblock all links to the repo, the name of the repo, a picture with a link/QR, etc.
By the way, people have already been and continue to be tracked down and attacked for doing these kinds of things (a notably incident that reached the front page of HN: https://news.ycombinator.com/item?id=10101469), so no, the assumption that people will be attacked for doing this is most definitely not wrong.
You don't think governments hack their enemies?
If you're on the internet, then you can be targeted by anyone across the world, no matter where you live. Psyops/social engineering, identity theft, DDoS, doxxing, blackmail...