How to Create a Personal Web Page Using GitHub

You'll Need to:

  1. Create a GitHub account if you don't have one already.
  2. Download and install Visual Studio Code (VSCode).
  3. Download and install Git Bash

It would also be beneficial to have a basic understanding of how the Git workflow operates. In the upcoming image, you'll find a graphical illustration that will provide a visual representation of this concept.

GIT Workflow

GIT Workflow by tex.stackexchange.com

For a more comprehensive grasp of this workflow, I recommend proceeding to the next video. Within the initial three minutes, you'll gain a clearer insight into the sequence of steps, serving as a valuable precursor before delving into the process of creating a repository on GitHub. Video courtesy of Georga Tech.

To create your own personal web page on GitHub, follow these steps:

On GitHub:

  1. Log in to your GitHub account and create a new repository.Give it a name.

In Git Bash:

  1. In Git Bash, open the command line and create a folder for your repository using the command mkdir "repository_name". Remember to note down the path or location of this folder; you'll need it later.
  2. Inside the folder, create an HTML file with the command touch "file_name.html"

In VSCode:

  1. Open VSCode and navigate to the folder of the repository you created in the previous steps.
  2. In the HTML file, write the HTML code to structure your first web page and its content.
  3. Save your work by clicking "Save" or using the shortcut Ctrl+S.

Back in Git Bash:

  1. Return to your Git Bash command line, ensuring that you are inside the folder of your repository by using the pwd command. Then, proceed with the following commands:
    1. git init
    2. git add "file_name.html"
    3. git commit -m "Description of your first file."
  2. Push your repository to GitHub with the following commands:
    1. git branch -M main
    2. git remote add origin (add the https of your repository on GitHub)
    3. git push -u origin main

On GitHub:

  1. Create a new GitHub repository and upload your index.html file.
  2. Go to your repository's settings on GitHub and ensure that the branch is set to "main." Click save.
  3. Wait for 3-5 minutes for GitHub to deploy the information.
  4. Then click on the "Visit Page" link in the settings of your repository, and there you have it!

Now, your personal web page is live on GitHub. Enjoy!

If you're finding it challenging to follow the steps outlined above, I encourage you to take a look at my video tutorial.