How to Create your first website on GitHub Pages

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

Blogger | FullStack Developer 💻 | UI/UX | Undergraduate 🎓 |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store