Using GitHub in your classroomInitial setupCreating a new organization for your courseInviting students to your course organizationCreating your GitHub ClassroomCreating a new assignmentCreating an assignment repo templateSharing the assignment repo via ClassroomSteps to be completed by the studentAccessing student assignment reposCreating team assignmentsInstructor's stepsStudent's steps
To use GitHub in your course, you will need:
The first step is to setup the GitHub account for your course.
In this exercise, you will create a new organization account for your course. In the steps that follow, we'll assume that the user jdcolby2
is the instructor.
+
pulldown menu and select New organization.
colby-git123-fa2021
.If you added a list of students to the organization in an earlier step, you will see the list of students under the People tab. If not, you should just see yourself under that tab.
If you did not pre-populate the course organization with student account names (a likely scenario given that you may opt to create the course organization before the start of the semester), you can send an invite to your students.
Once a student has accepted the invite, that student's account name should appear under the People's tab.
This next step makes use of GitHub's Classroom. This is the environment that you will use to manage student assignment repos and to create teams for group activity.
At this point, you will see your GitHub classroom landing page. This is a one time operation. You will want to note and bookmark the following:
You will want to share the GitHub organization link with your students as well. But note that the students will only see their own assignments and not those of their peers.
The course organizational account and classroom setup is a one time operation. For the duration of the semester, assignments/projects will be created using the following steps:
A sample workflow follows:
Navigate to your GitHub page.
In the upper right-hand corner of the page, click on your avatar and select Your organizations.
You should see your course organization listed. Select it.
If this is the first time creating a new repo, click on Create a new repository.
If you already have existing repos, click on the New button.
Give this repo a name, e.g. HW01
. You'll probably want to keep this repo private (i.e. only accessible to your classroom organization). You'll also want to create a README file that will provide students with assignment instructions.
Click Create repository to proceed.
This will bring up the new assignment repository. You can modify this repo as you would any other repo via the GitHub interface, or by cloning to your local computer then pushing back to GitHub.
Once you've created your assignment repo, you will need to convert it to a template. Doing so will allow students to clone this assignment in their own GitHub account.
Click on the Settings tab, the check Template repository.
Navigate to https://classroom.github.com/ and log in using your GitHub user account.
Select your classroom.
If this is the first adding an assignment to Classroom click on Create an Assignment.
Assign a name to this assignment. It can be the same name as that created in the Organization account. You can stick with the other defaults if this is an individual assignment. Click Continue.
Next, assign a repo template to this Classroom assignment. Do so by clicking on the Select a repository pull-down menu and start typing the first few letters of your Organization repo name (in this example, we start typing colby-
at which point our colby-git-fa2021/HW01
should pop up. It may take a few seconds before GitHub lists all repo names starting with colby-
.
If you do not see the homework repo listed, its possible that you did not check off the Template repository option in an earlier step.
Click Continue.
We will not add auto-grading features, so we can click on the Create assignment button.
The Classroom assignment is ready. Note the link to this assignment.
This is the link that you will share with your students via a course management system such as Moodle. This link will create a clone from your HW01
template for each student. Student instructions follow.
jdcolby
hence the repo name hw01-jdcolby
. Your repo should reflect your account name.
hw01
repo. Any changes you make to this repo are yours and yours alone.To access all student assignments, navigate to your course's Organizational page and not the Classroom page. Here, you will see your assignment templates (e.g. HW01
) and you students' work with a repo name that concatenates the repo template with the student's GitHub use account name (e.g. hw01-jdcolby
)
Students can be assigned to teams whereby all team members have read-write access to the same assignment repo.
The first step involves creating an assignment under the course's organizational account as was demonstrated in an earlier exercise.
The next step is to setup the Classroom assignment. Point your browser to to https://classroom.github.com/ then select your course's classroom.
Create a new assignment.
In this example, we'll name it grp_hw02
and change the settings to Group assignment. If you plan to recycle the set of teams for future assignments, you might want to assign a meaningful name to this set of teams. You can also define the maximum number of teams and team members.
On the next page, you will be prompted to select the template repository as was done in an earlier exercise. From there, adopt the default settings. This will generate a new link for this group assignment that you will share with your students.
In addition to providing the students with the group assignment link, you will need to assign them a team name (it will be created by the students when they clone the rep)
Navigate to the GitHub classroom provided link
If the student's assigned team has not been created, it will not show up on the page. She will need to type in her team name. For example, if she is assigned Team01, she would type team01
in the empty field.
The next step is to accept the assignment in which case the team repo is created.
If the student's assigned team has been created, she simply needs to click on the team name's Join button.
The next step is to accept the assignment in which case the student is assigned co-authorship of the repo.