如果想在github上预览github仓库中的代码,可以通过使用github pages来实现这个功能。以下是我设置gitbub pages 的步骤,以备日后查询。
1.登入 GitHub,新建一个 repo。

第一步:输入要创建的仓库名称,我这里的输入是demos1
第二步:初始化你的仓库并写入README文件
第三步:点击绿色的按钮就创建了仓库
2.接下来进入setting页面。

第一步:选中你刚才创建的仓库
第二部:点击setting
3.setting页面向下滚,找到github pages进行设置。

第一步:选择master 分支。
第二步:点击save,进行保存。
4.接下来你就可以找到这个仓库的预览地址。

我的demos仓库url为:http://todoi.github.io/demos/
5.如果你要看预览这个仓库中其它的文件可以在仓库地址后面加上你要的文件路径。

网友评论