问题
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.html
Now 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
?
回答1:
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.
来源:https://stackoverflow.com/questions/25396383/does-a-folder-in-my-user-site-conflict-with-a-project-site