Table of contents
How to use GitHub Classroom as a student
The assignment procedure is something like the following:
- The teacher creates an assignment and sends the assignment link to the students
- A student accepts the assignment by clicking/following the link
- The assignment template is used to create a repo for the student
- the created repo can be private or public depending on how the teacher configured the assignment
- The student clones the repo to his own computer and then completes the assignment (writes code etc.)
- The student then commits the changes (
git commit
) and remembers to PUSH (git push
) the changes to the remote repo - The teacher sees the assignment answer and can evaluate it and add comments
The following video goes through the process from the students view. The video shows:
- how to clone GitHub repo with Visual Studio Code (Get Visual Studio Code)
- and how to commit and push changes back to the remote repo.
Note! A great extension for VS Code when working with GitHub is GitHub Pull Requests and Issues. Read more about that extension from the document Working with GitHub in VS Code.
The video is spoken in Finnish but it has English subtitles/closed captions.
Git configuration
Be sure to set the git configuration properly for the commits to show up to the teacher. It is required to use the same email and name that are used in task assignments.
You can configure local settings for git per project so you can leave your global settings as is.
To set local configuration for a project use the following commands in the same folder where the project’s .git folder is:
Set local user.name
git config user.name "Your name here"
Set local user.email
git config user.email "Your.email@goes.here"
When you clone the assigned task repo to your computer then set the local config (if it differs from your global config). For more details check Setting your username in Git .