GitHub Classroom Setup
WARNING: These directions were last used in Fall 2023. GitHub may have
changed the process since that time.
A number of us are using GitHub Classroom because it allows instructors to
create initial repositories with code (minimizing variation between
repository setups) and has an easy-to-use client that allows downloading
all solutions with just a few clicks.
- Visit GitHub Classroom
- Sign in, using an account with the
@msoe.edu
email
address, creating one if necessary. You should be on a page labeled
"GitHub Classroom".
- Click on the New classroom button.
- It will ask you to select an organization for your new classroom,
click on Grant access to an organization that is not listed.
- Click on the Organizations link on the left hand side of the page.
- Click on New organization.
- Select the $0 plan.
- Set an Organization account name. This name will prefix all
repositories, so it should be short and all lower case and should
incorporate your name in some way; I used "rwhc".
- Fill in the Contact email and set "This organization belongs
to:" to My personal account.
- On the Welcom to GitHub page, where you can enter more email
addresses, click Skip this step.
- Return to GitHub Classroom
and click New classroom.
- Assuming you do not see your new organization listed, click
on grant us access in the "ProTip!" section.
- Scroll to the bottom, find your new organization, and click on Grant.
- Return to GitHub Classroom
and click New classroom.
- Select your new organization.
- Configure the Classroom name; assuming your organization
captures your name, it should be adequate to just include the course, but
you could possibly enter the section as well. I use
rwhc-se2811
.
- The next step adds other people as administrators; we typically don't
have any. Click Continue.
- I Skip connecting to the LMS.
- Enter the email addresses of the students and click on Create roster
- Next, you need to request the ability to set up private
repositories. Navigate to your classroom. and click Create an individual assignment.
- You should be on a page where you can set up the assignment, but
the Private cannot be selected. Click on Apply for free
private repositories.
- Fill out the form for the discount request. For "How do you plan to
use GitHub?", I wrote
Allow teams and individual students to use Git repositories and to submit
solutions via Git.
Once the approval is granted, visit https://education.github.com/benefits
,
scroll to the bottom, find your new organization, and click on Upgrade.
Setting up an assignment
You should now be set up with a GitHub classroom for your section(s).
- Visit GitHub
Classrooms, select your classroom, and click on New assignmnet
- Select Create an individual assignment or Create a group assignment.
This writeup assumes a group assignment, but an individual assignment
should be similar.
- Set the assignment title. This will be used in front of the username
to create repositories.
- Make the repositories private. If this is not an option, you need to
complete the above process.
- If you have initial code or a directory structure for them to use,
create a GitHub repository containing the
files. This repository can be private, but it must have Template
repository set in the project settings page. Enter the repository
name to browse for it.
- Set team options as appropriate. We generally have the teams create
their repository using their login names. I set the max number of
students per team appropriately, but note I generate the teams in Canvas
and do not pass this info along to GitHub (meaning you don't have to
enter the teams into GitHub).
- Ensure Enable assignment invitation URL is set.
- Give students administrative access. This allows them to rename the
repository if they've created it with the wrong name.
- Click Create assignment.
GitHub will respond with a link to send to the students. I tell them the
pattern to use to create the repository name. I require students to keep
repository names all lower case; this simplifies access on Macs and Linux
systems and increases uniformity.
GitHub's Classroom Assistant can then be used to download all projects
with a few clicks. To get the URL for an assignment, open the assignment in
GitHub classroom and copy the URL into Classroom Assistant. The URL will
not always match the sample URL given in Classroom Assistant; this appears
to be a bug.
Recommended Settings
By default, GitHub signs you up for a number of notifications. These are not
useful for instructors. Log in to GitHub, select Settings
from your personal menu in the upper right, click on Notifications, and
turn off automatic watching and other settings for which you do not want
emailed notifications. I clear them all.
It is strongly recommended students not use branches in
Github Classroom. I have experience with them creating problems when
cloning projects, and they are unnecessary for the expected use case.