How to Create your first website on GitHub Pages

Bawantha Rathnayaka
2 min readMay 2, 2019

What is Github page

GitHub Pages are public web pages for users, organizations, and repositories, that are freely hosted on GitHub’s github.io domain

  1. First you log into your Github account

Once you’ve signed in, you’ll create a new repository to get started and you need to give this repository a special name to generate your website.

Now open your git bash terminal.

Next go to the folder where you want to store your project, and clone the new repository this command

git clone https://github.com/username/username.github.io

Now create the index.html file in folder use this command

cd username.github.io

echo “Hello World” > index.html

And Push it

git add — all

git commit -m “Initial commit”

git push -u origin master

Now go to the your repo settings tab and scroll down you’ll see the GitHub Pages section near the bottom and select the master brance and save it

Now your Done!

Fire up a browser and go to https://username.github.io/repositoryname

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Bawantha Rathnayaka
Bawantha Rathnayaka

Written by Bawantha Rathnayaka

I write about my experiences as a Software Engineer and the tech I use daily. portfolio - https://bawanthathilan.vercel.app/

No responses yet

Write a response