Add Your Demo Content On GitHub Pages

In previous GitHub tutorial post I shared tutorials about common uses of GitHub and  How to host Web Pages on GitHub in 5 Minute , now it's turn to know something advance which can helps you a lot.

If you are a web developer and Running various blog hosted on WordPress or BlogSpot then sure some times you need to share your dummy content or development to users as demo, but because of hosting related issue may be you are getting trouble.

Add Your Demo Content On GitHub Pages
Add Your Demo Content On GitHub Pages

GitHub Pages best alternative for Free and Public html content, it's also can be hosted with your own domain.
In last post I shared how to Create GitHub Pages for your domain but now I'm going to share how to upload content on GitHub Pages sub directory and Add Your Demo Content On GitHub Pages.

First you should go to and Create New Repository kindly follow this tutorial for basic reference.

Once repository created simply clone it on you desktop.

git clone your_repository_url.git

once clone completed enter clone directory using below command.

cd your_repository_name

Now paste your content (Html, Css, Js etc.) here and follow below steps.

Add your content using below command

git add .

Create a gh-pages branch

git checkout --orphan gh-pages

Commit your work

git commit -m "Project Done"

Push content on GitHub pages

git push origin gh-pages

Now you can check your site http(s)://<username><projectname>

Enjoy 🙂

Himanshu is a young engineer living in India. Currently working at Cognizant as a Senior Engineer. He is an ethical hacker & blogger too, doing lots of crazy stuff... If you seem interesting, go through his portfolio: : "Open Source. Millions of open minds can't be wrong!

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer

Sliding Sidebar

We are India’s largest Startup Community

We are team of ' Delhi Startups ' , most active startup community with strict spam policy.
We are making !deas happen..for future, business and jobs without charging anything, with connecting entrepreneurs.. It's a reason to trust on us.
Come and join or subscribe, we will defiantly give a reason to like us.

Our Facebook Page