/github.io-guide

Github.io guides - Host your Static website with Github.com

Logo

A Guide to host your Static website with Github Pages

Watch step by step guide video »

Step by step guides:

img

1) Step 1: Visit to Github.com and Create new repository by clicking "New"

img

  1. Step 2: provide repository name (in our case *my-demo-website), *important Choose "Public" and click Create repository (reason of choosing public is that in Basic/Free plan Github only allow Github pages repository to be public)

img

  1. Step 3: Copy the highlighted link, Create any folder in Desktop -> Open it -> Right click inside folder and open Git Base Here [if you are not have git base installed visit to following link https://git-scm.com/downloads download and install it].

img

  1. Step 4: Goto github.com you can see repository that we just created copy full .git link by clicking copy icon. In Git Base terminal write following commands

    git clone https://github.com/rajperficient01/my-demo-website.git
    

and hit enter Now inside your folder you can see one folder is being created -> close Git Bash now -> open newly created folder(in our case my-demo-website folder) and now open Git Base here by right clicking here.

img

img

  1. Step 5: Next step is to paste your source code here : copy and paste your code all files -> In git base type following commands

    git status
    git add .
    git commit -m "initial commit"
    git push
    

img

  1. Step 6: And now if you visit to Github.com you can see your files added (refresh the browser)

  2. Step 7: Open the setting tab

img

  1. Step 8: scroll down -> in left menu clicke on "Pages"

img

  1. Step 9: Now inside Source dropdown choose "Main" (main in branch name-your main/origin branch) -> next dropdown is automatically selected leave it default and now click on "Save"

img

img

  1. Step 10: the page is automatically refreshing and after that you will get link to your live website --> And now share this link with your friends
https://rajperficient01.github.io/my-demo-website/