Skip to content

Let’s Git to Committing!

Make sure GIT is installed!

Before you can commit, you need to make sure that you have Git installed. If you don’t have it installed, please follow the instructions here.

Commits are the basis of Git and GitHub.

Do not upload manually!

While it may be tempting to manually upload files through GitHub, for the purposes of this class, this will cause many headaches. For this class you should only commit through VS Code!!!

In a nutshell, Committing is Git speak for saving files. However, these saves come with a note so that you can refer back to save later!

It’s better than autosaving because you have a description of what that save is!

Let’s make our first commit:

Click on the Source Control icon in the activity bar in VS Code:

Enter a note for your commit:

Click the checkmark OR use the following shortcut:

  • PC: Ctrl+Enter

  • MAC: Cmd+Enter

Next, click on the ... for expanding the menu items:

Finally, click on Push to upload your changes to GitHub:

If you see the VS Code periodically wants to run fetch dialogue, click Yes to allow it to randomly update your repository.

Optional: Easier Commits

Timesaving Tip!

You can avoid having to do the extra steps of clicking ... then push by turning on a setting to push after each commit!

Here’s how to do so:

  • Go to File -> Prefences -> Settings

  • Search post commit in the text box at the top

  • Change the setting from none to push

  • Now the next time you commit by pressing the following shortcut, it will push automatically!
  • PC: Ctrl+Enter
  • MAC: Cmd+Enter

Using GitHub Pages

After you have saved and committed your files to GitHub visit your repository on https://www.github.com.

What is a repository?

A repository is GitHub speak for location for a specific project and/or bunch of files. You can think of it as folder. For this class, instead of making a new repository for each week we will have just one lab assignment repository with different folders for the weeks. Learn more about repositories here: About repositories (GitHub.com).

You can find your repositories by clicking on your profile picture:

Then click on Your repositories

Find your assignment repository and click on it:

Click on Settings:

Click on Pages:

and under Source , click on the main branch 1:

Choose root:

Click on Save:

Copy this link:

Nothing shows up?!😱

If you navigate to https://YOUR_GITHUB_ACCOUNT.github.io/23s-asiaam-191a-assignments/ it will be blank because there’s nothing in the root.

You have to add /YOUR_WEEK_1_FOLDER_NAME/index.html to access the contents of the lab!

For example, https://albertkun.github.io/23s-asiaam-191a-assignments/week1/index.html

Post it in the Discussion forum for the appropriate lab:

Paste your link in the comment box at the bottom

Click on Comment to submit the lab:


  1. Your branch may be called master if your repo was created in VS Code. Read more about why here