Table of Contents

In my previous post on version control systems (VCS), I discussed why strong version control skills are essential and highlighted Git as one of the most widely used VCS tools.

To make managing Git repositories and assignments easier, GitHub Classroom was created. Itโ€™s built on top of GitHub, the online platform for hosting Git projects, but is specifically designed for classrooms. With GitHub Classroom, educators can provide starter code, automatically organize student repositories, and provide students a simple way to submit their work, using a workflow that mirrors how professional developers manage projects.

Although GitHub Classroom is built on GitHub, creating repositories works a little differently: you must first accept the assignment before a repository is created for you.

๐Ÿ›  Accept Assignment

๐Ÿ“ Version Control | ๐Ÿ•‘5 minutes | Required Files : none

To begin using GitHub Classroom for your course assignments, you’ll need to connect your GitHub account to the classroom set up by your instructor. Follow these steps to get started:

Step 1: Connect Your GitHub Account to the Classroom

  1. Follow the Link Provided by Your Instructor
    Go to the link shared by your instructor (you can find it in the course LMS).
  2. Select Your Name from the List
    Once the page loads, find your name and select it from the list of students to connect your account.
Join GitHub Classroom
Join GitHub Classroom

No Student List

If you donโ€™t see a list of students to select from, simply accept the assignment by following the steps below. Accepting the assignment will automatically add you to the GitHub Classroom course.


Step 2: Accept Your Assignment

Each assignment in GitHub Classroom will have its own repository that will automatically be created when you accept the assignment.

  1. Click the Link for the Assignment
    Use the link provided by your instructor to navigate to the assignment page.
  2. Accept the Assignment
    Click on Accept the assignment to join the course repository.
Accept the GitHub Assignment
Accept the GitHub Assignment

Step 3: View Your Repository

Once you’ve accepted the assignment, you will want to access repository (commonly referred to as a repo) page on Github.

  1. Refresh the acceptance page to see your repository.

To start working with your repository locally, you will need to copy the repo’s web URL.

  1. Copy the Repository URL
    On the repository page, click the Code button. From the dropdown, copy the HTTPS URL of the repository.
GitHub repository URL
GitHub repository URL

๐Ÿ›  Cloning a Repository

๐Ÿ“ Version Control | ๐Ÿ•‘5 minutes | Required Files : none

In order to work on the GitHub classroom assignment, a local copy of the repo will need to be made. There are several methods for cloning repos, for this tutorial, we will be using GitHub Desktop.

Ensure Git is Installed

Before using GitHub Desktop, make sure Git is installed on your computer. Additionally, consider installing Git Large File Storage (LFS) for projects involving large files (>2MB), such as game development with assets.

Step 1: Open GitHub Desktop and Log In

  1. Launch GitHub Desktop
    Open GitHub Desktop on your computer.
  2. Log In to Your Account
    Make sure you are logged in to your GitHub account in the desktop app.

Step 2: Clone the Repository

  1. Navigate to Clone Repository
    In GitHub Desktop, go to the menu bar and click File > Clone Repository.
In GitHub Desktop choose Clone Repository
In GitHub Desktop choose Clone Repository

Step 3: Select Your Repository

  1. Choose from Your Repositories
    A new window will appear displaying all the repositories available in your GitHub account. Select the repository you want to clone locally.
Select the repository to clone
Select the repository to clone

Step 4: Clone via URL (if needed)

If you have a large number of repositories or if you are cloning a GitHub Classroom Assignment, you may want to use the URL option.

  1. Click the URL Tab
    In the dialog box, click the URL tab at the top.
  2. Paste the Git URL
    Paste the git URL you copied from the repository page on GitHub.
  3. Set the Clone Location
    Choose the folder where you want to save the repository on your local machine, then press Clone.
Set the Git URL for the clone repository
Set the Git URL for the clone repository

Cloned Repo Save Location

Make sure you select the correct location to save your local repository. In the example above, I have my students save their cloned repositories on the D: drive using the following folder structure:D:\Students\YourName.

Once cloned, you’ll have a local copy of your repository and can begin making changes that sync with GitHub.

Tagged in:

,