Github页面显示主分支,而不是gh-pages [英] Github page shows master branch, not gh-pages

查看:963
本文介绍了Github页面显示主分支,而不是gh-pages的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法将文件推送到我的repo的主分支以及另一个名为 gh-pages 的分支。当我启动 mysite.github.io 时,它会显示主分支的内容。有没有办法将它重定向到 gh-pages 而不是?

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?

我从Mac终端。

推荐答案

听起来像是您将用户/组织页面与Project页面混淆。

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

用户/组织页面生活在名为 username.github.io 的专门命名的存储库中,并从 master 分支发布。他们可以浏览 http://username.github.io

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.

项目页面可以是任何存储库的一部分,并且可以从特殊的 gh-pages 分支。他们可以浏览 http://username.github.io/project-name

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.

如果你想要有一个项目页面,请确保您的存储库不是以您的GitHub用户名命名的。如果您希望您的项目在 http://username.github.io 处可用,您必须具有用户/组织页面,该页面必须 master 分支发布。

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.

这篇关于Github页面显示主分支,而不是gh-pages的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆