Why GitHub pages on [username].github.io won't show?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 07:21:26

问题


I created repo [username].github.io, pushed first commit in gh-pages branch, have been waiting for 30 mins (GitHub says, it shouldn't take more than 10) and got 404 page trying to load my page. Checked out with different browsers, results are the same.

Here's the way how I've done it:

$ 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

What's the problem?


回答1:


The documentation mentions:

If you generated a User Pages site, the code lives in the master branch instead of the gh-pages branch.

In your case, you might want to create and push a master branch.

git checkout -b master
git push -u origin master

Update August 2016: Simpler GitHub Pages publishing now allows to keep your page files in a subfolder of the same branch (no more gh-pages needed):

That means project pages can now also live on master.



来源:https://stackoverflow.com/questions/27202065/why-github-pages-on-username-github-io-wont-show

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!