Sarath
Sarath

Reputation: 9156

How to publish "master" branch pages instead of "gh-pages"?

Form the document user-organization-and-project-pages.

User & Organization Pages live in a special repository dedicated to only the Pages files...

"Unlike User and Org Pages, Project Pages are kept in the same repository as the project they are for....

So if i have a public repository my project page will be available as "gh-graph" branch and it will be available in the url http://username.github.io/projectname.

But how can I publish the content in master page to this url. ? or how can I create a user/org page?

what is the actual difference between user/org pages and project pages ?

Upvotes: 1

Views: 859

Answers (1)

Stefan Näwe
Stefan Näwe

Reputation: 3104

User/org pages are served from http://username.github.io. Their content lives in the master branch of the repository username/username.github.io (http://github.com/username/username.github.io.git exactly).

Project pages are served from http://username.github.io/proj. Their content lives in the gh-pages branch of the repository username/proj.

My user page is here https://github.com/snaewe/snaewe.github.com for example (nothing fancy, just auto-created) -> http://snaewe.github.io

A sample project page is here: https://github.com/snaewe/MPC/tree/gh-pages -> http://snaewe.github.io/MPC

Note: I created those pages when github used ...github.com as the domain name. Today it's ...github.io.

If you have an index.html in the master branch of your project and want to use that as the project page, just push the master branch to the gh-pages branch in your github project:

git push origin master:gh-pages

Upvotes: 3

Related Questions