[英]Github page shows master branch, not gh-pages
I've managed to push files to the master branch of my repo as well as a second branch called gh-pages
.我设法将文件推送到我的 repo 的 master 分支以及名为gh-pages
的第二个分支。 When I launch mysite.github.io
it shows the contents of the master branch.当我启动mysite.github.io
它会显示 master 分支的内容。 Is there a way to redirect it to gh-pages
instead?有没有办法将它重定向到gh-pages
呢?
I'm doing this from the Mac terminal.我正在从 Mac 终端执行此操作。
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. 用户/组织页面位于一个名为username.github.io
的特殊命名存储库中,并从master
分支发布。 They can be browsed at http://username.github.io
.它们可以在http://username.github.io
浏览。
Project pages can be part of any repository, and are published from the special gh-pages
branch. 项目页面可以是任何存储库的一部分,并从特殊的gh-pages
分支发布。 They can be browsed at http://username.github.io/project-name
.它们可以在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.如果您想要一个项目页面,请确保您的存储库没有以您的 GitHub 用户名命名。 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.如果你想让你的项目在http://username.github.io
上可用,你必须有一个用户/组织页面,它必须从master
分支发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.