Host a Website on Github
Hosting a website on GitHub is free and very easy.
Start by creating a new GitHub repository and create a file called index.html. This is the default page that will load when someone goes to the website. Add the website content in the index.html file.
Next, commit the changes with a message and push it to the master branch.

Github works by being back up by git, which is a version control system. It lets you take snapshots of your files. This way if you mess up something in the file, you can easily rollback those to the previous commit. You can also push the code in a new branch and merge that to the master branch. For the purpose of this blog post, I pushed it directly to the master branch.
To set up GitHub pages, create a new branch called gh-pages

Next, set the gh-pages branch as the default branch. For that, go to your repository project settings, select the third option “Branches” and change the “Default branch” dropdown menu from master to gh-pages; hit update to set that as the default branch. Now if you go to the project repository, you’ll gh-pages as your default branch.
Now, just by doing that we’ve turned a simple GitHub repository to a website that is public for everybody to see. The URL is:

If you enter that you’ll land on the webpage that looks exactly the same as the locally hosted webpage.