-
创建一个仓库,名字格式:
username.github.io
其中username指你的github账号名字
-
在master分支上添加 index.html
-
在此仓库的master分支上的网页可以直接显示出来
-
网站地址:username.github.io(仓库名字)
-
创建一个仓库,仓库名字:flex(可自定义)
-
在本地创建一个分支 分支名字:gh-pages
-
创建远端gh-pages分支
-
进入远程仓库,点击Settings=>Branches=>Default branch 选择gh-pages分支, 点击Update,将gh-pages选为默认分支
-
在gh-pages分支上添加 index.html
-
访问地址: username.github.io/flex(用户站点主分支仓库名字/分支仓库名字)