Lately exploring some GitHub repositories, I see that many of them have a branch called “ gh-pages ”. It has caught my attention because when I saw it for the first time I didn't give it much importance... but when I saw it in several repos it made me curious and I thought that it must be useful for something.
Does anyone know what this branch is for? The only documentation I saw about it is this: https://help.github.com/articles/creating-project-pages-manually/ but it's not very clear to me what it's for.
Websites for us and our projects!
Github
It gives us the possibility of generating a website from our organization or project, very useful for portfolios, blogs and all kinds of front-end pages (totally free).How do we create the branch?
gh-pages
We open the console and position ourselves inside the folder of our project and type:
This will create the branch
gh-pages
in our project. Finally, we have to upload it to our remote repository (Github
) doing a push like this:You can now login to your site via http://username.github.io/repository
Advantage
Show your projects to the world for example CV, Landing Page, page of your business, Documentation, etc. It's a great way for them to see your work
front-end
without having to purchase and/or use a domain.Disadvantages
Unfortunately we can't use server side code (
Python
,Ruby
,PHP
, etc.). So if you only want to display a project (Front-end
),GitHub
Pages is your best option.Examples of users using Github pages
http://rosadintv.github.io/
http://routerkeygen.github.io/
http://jasperproject.github.io/documentation/
More information
https://pages.github.com/
https://help.github.com/categories/github-pages-basics/
This branch
gh-pages
allows you and is a great way to show your projects to the world through a website. Whether for a portfolio,landing page
and even to create ablog
. All for free and with unlimited repositories. Unfortunately we can't use server side code (Python
,Ruby
,PHP
, etc.).So if you only want to show a project (Front-end),
GitHub Pages
it is your best option.If you want to document yourself more, I recommend this super article that is a step by step, to achieve what was said above.
Step by step - Article Git Hub Pages