Github page shows master branch, not gh-pages

匿名 (未验证) 提交于 2019-12-03 01:38:01

问题:

I've managed to push files to the master branch of my repo as well as a second branch called gh-pages. When I launch mysite.github.io it shows the contents of the master branch. Is there a way to redirect it to gh-pages instead?

I'm doing this from the Mac terminal.

回答1:

It sounds like you're confusing User / Organization pages with Project pages.

User / Organization pages live in a specially named repository called username.github.io, and publish from the master branch. They can be browsed at http://username.github.io.

Project pages can be part of any repository, and are published from the special gh-pages branch. They can be browsed at http://username.github.io/project-name.

If you want to have a project page, make sure that your repository is not named after your GitHub user name. If you want your project to be available at http://username.github.io, you must have a User / Organization Page, which must publish from the master branch.



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