Sunday, November 26, 2017

Github Pages - Day 15

Github Pages

Normally, we host websites for a particular amount. But Github helps to host webpages for free.

So, lets create the github page..


Create a new repository named username.github.io, where username is your username on GitHub.
If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.

Then, you have to clone the repository to your computer

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

After clone the repository you have to go into the username.github.io in the terminal...

$ cd username.github.io

Then you have to create a file and save it in that folder.

Now,you have to push that file to the repository from your folder.

$ git add --all    or   $ git add *   or   $ git add .

$ git commit -m "Initial commit"

$ git push -u origin master

So, you have done it...

Now browse the site
https://username.github.io.

No comments:

Post a Comment