1.按Win + R快捷键,输入cmd命令,打开命令行窗口,输入ping github.com命令,查看自己github的ip(由于GitHub的ip经常改变,需要注意ip的有效性),
如图一所示:

2.打开系统文件hosts,文件的绝对路径为C:\Windows\System32\drivers\etc,将ip添加到此文件中,如图二所示:

3.将如下内容也一并添加进去:
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com
如图三所示:

,添加完毕后保存。
4.打开命令行窗口,输入ipconfig /flushdns命令,刷新编辑后的hosts文件。
如图四所示:

,即为刷新成功!再次访问github网页,不太丝滑,但再也不用长时间等待网页的加载。如果访问github网页过程中依然出现无法正常访问的情况,可以尝试重复第四步骤,刷新被屏蔽解析的DNS,多次亲测有效!