Using Git

1. Download course content

Mac: Cmd+Shift+P 

Workflow: Avoid making changes directly in the lecture and exercise repositories. If you want to save work you do in a notebook, first save a copy in another folder. 

1.1. Git terminology

When working with Git in VSCode, you will mainly use the following commands:

For the lecture and exercise repositories, you will normally only use Pull, since you only want to download course updates.

For your own group repository, you will normally use Commit All followed by Sync, since you both download changes made by your group members and upload your own changes.

1.2. Source Control in VSCode

The Source Control panel in VSCode gives you an overview of the Git status of your repository.

It shows which files you have changed since your last commit. From the panel, you can:

You can open the Source Control panel by clicking the branch-shaped icon in the left sidebar.

You can also see the Git status directly in the Explorer panel. Small letters next to files indicate their status, for example:

For most course work, the Source Control panel is the easiest way to see what you have changed and to commit and sync your work with GitHub.

2. Make your own Github repository

Follow the steps below to create your own repository on GitHub, which you can use to organize all group work in this course.

2.1a. If you are the creator of the repository

2.1b. If a group member has already created your repository

Ask the creator to invite you to the repository (see below).

2.2. You can also invite members to your team

2.3. Connect to GitHub

Mac: Cmd+Shift+P

Mac: Cmd+Shift+P

Mac: Mac: Cmd+Shift+P