GitHub Pages允许每个用户拥有一个用户网站 (也许是一个主页)和无限的项目网站 。
设置用户网站时 , 必须命名repo [username].github.io (其中[username]是您的GitHub用户名),并且默认URL为:
http://[username].github.io/您在[username].github.io对master分店所做的任何更改[username].github.io上传到您的用户站点。
当你建立一个项目网站时 ,你可以命名你想要的任何回购(我们称之为[projname] )。 网址默认为:
http://[username].github.io/[projname]您对[projname]的gh-pages分支所做的任何更改[projname]上传到项目站点。
我的问题是,如果在您的用户网站存储库中,您巧合地拥有一个与您的项目网站存储库具有相同名称的文件夹?
例如,假设您的用户网站repo bob.github.io的文件夹temp/中有一个文件index.html 。 然后,该网页将在网上托管
http://bob.github.io/temp/index.html现在说你创建一个项目网站与回购名称temp 。 在该回购中,您有一个名为index.html的文件。 然后,当你将它推送到gh-pages分支时,它是否将在线托管
http://bob.github.io/temp/index.html?
GitHub Pages allows each user to have one User Site (maybe a home page) and unlimited Project Sites.
When you set up your User Site, you must name the repo [username].github.io (where [username] is your GitHub username), and the URL is by default:
http://[username].github.io/Any changes made to the master branch in your [username].github.io repo are uploaded to your User Site.
When you set up a Project Site, you can name the repo anything you want (let's call it [projname]). The URL is by default:
http://[username].github.io/[projname]Any changes made to the gh-pages branch in your [projname] repo are uploaded to the Project Site.
My question is, what if in your User Site repository, you coincidentally have a folder that has the same name as your Project Site repository?
For example, say you have a file index.html inside a folder temp/ in your User Site repo bob.github.io. Then that page would be hosted online at
http://bob.github.io/temp/index.htmlNow say you create a Project Site with repo name temp. In that repo, you have a file called index.html. Then when you push it to thegh-pages branch, would it be hosted online at
http://bob.github.io/temp/index.html?
最满意答案
Github支持回复:
是的,他们会发生冲突。 项目网站的网址将为username.github.io/project,用户或组织网站中的文件夹的网址将为username.github.io/project。
我建议您重命名目录或存储库名称。
Github support response:
Yes, they would conflict. The url for Project sites will be username.github.io/project, and the url for a folder in a user or organization site would be username.github.io/project.
I would recommend that you either rename the directory or the repository name.
更多推荐
发布评论