Github Pages: Why Do I Need Gh Pages?

I have deployed a personal blog using Github pages, and I see that in some tutorials you are asked to create a gh-pages branch. I did this, however, my changes to the website are visible only if I make changes to my host. So I'm confused, why do I need gh pages? Can someone explain this. Thanks

+6
source share
3 answers

You have one website per person or github organization in the main branch. This is used for a personal website or organization website.

Such a personal or organizational site is hosted on username.imtqy.com in a specialized repo in the main branch.

My personal blog, for example, is located at takacsmark.imtqy.com , it is posted in a repo called https://github.com/takacsmark/takacsmark.imtqy.com , the code is in the main repo branch and takacsmark.com points to this site via the CNAME file in the repo.

If you want to create a dedicated site for a github project, you can create a github page at the project level. This means that this is not a separate repo, as the example of the personal website above, Instead, it should be under the gh-pages branch of the repo project.

Check out the bootstrap repo for an example gh-pages project.

+2
source

GitHub can have two types of pages. The first type has files in the master branch, and the repo should be named the same as <username|organization>.github.{io|com} . There can only be one repository of this type.

Page URL: http://<username|organization>.imtqy.com or .com

The second type of page does not restrict the name of the repository, but the pages should be in the gh-pages branch.

Page URL: http://<username|organization>.imtqy.com/<repo_name> or .com

More details here .

+1
source

All Articles