为什么[用户名] .github.io上的GitHub页面不显示?

rvn*_*brg 2 github github-pages

我创建了repo [用户名] .github.io,在gh-pages分支中推送第一次提交,已经等待了30分钟(GitHub说,它不应该超过10个)并且有404页面试图加载我的页面.检查出不同的浏览器,结果是一样的.

这是我如何做到的方式:

$ git clone http://github.com/RedCorbie/RedCorbie.github.io
$ git add index.html 
$ git commit -m "Initial commit"
$ git branch gh-pages
$ git push origin gh-pages
Run Code Online (Sandbox Code Playgroud)

有什么问题?

Von*_*onC 5

文件提到:

如果您生成了用户页面站点,则代码将位于master分支而不是gh-pages分支中.

在您的情况下,您可能想要创建并推送主分支.

git checkout -b master
git push -u origin master
Run Code Online (Sandbox Code Playgroud)

2016年8月更新:更简单的GitHub页面发布现在允许将您的页面文件保存在同一分支的子文件夹中(不再gh-pages需要):

现在,您可以在存储库设置中选择源,GitHub Pages将在那里查找您的内容.

这意味着项目页面现在可以继续存在master.