github展示项目

时间:2023-03-09 03:37:29
github展示项目
首先在原repo中创建一个gh-pages分支,然后把你master分支的东西都搬过来,将这个gh-pages作为你的HEAD主分支。如果想删掉master分支,需要在repo的settings中修改default branch为gh-pages再删除。

假设你在repo的根目录下有一个hello.html,那么现在可以使用链接

http://<username>.github.io/<projectname>/hello.html

来直接访问它。
参考:Creating Project Pages manually