GitHub Classroom

· by Jo Hardin · Read in about 4 min · (673 words) ·

GitHub Classroom

If you have been reading along in the blog, you’ve noticed the last two entries describing GitHub and GitHub in R. And certainly, we continue to advocate teaching students to use GitHub as an integral part of their data science workflow. And GitHub may be the perfect place to store student projects either as public or private repositories.

But using GitHub to navigate a dozen homework assignments with 50 students can become logistically difficult. GitHub Classroom provides a structure for organizing and tracking private student repos in a class with lots of students and lots of assignments. GitHub Classroom provides unlimited private repositories for your students.

What are the benefits of GitHub Classroom?

The primary benefit of GitHub Classroom is the structure of student repositories. After the instructor has set up a classroom within GitHub Classroom, each HW assignment gets its own link. When a student clicks on the link, a new repository is immediately created for that student (e.g., called HW1-student1); only the student, the instructor, and possibly TAs (if given access) can see or access the repository. The student will complete the assignment and push their work back to the repository that was created by GitHub Classroom. The instructor can then use shell commands to seamlessly read the assignments and provide feedback. A typical workflow would look like:

  1. HW1 assignment link is created, students 1 through N each click on the link, creating N repositories: HW1-student1, HW1-student2, … HW1-studentN.
  2. Each student completes the assignment and pushes their work to their individual repository.
  3. Using a single shell command, the instructor (or TA) clones all N repositories onto their own local machine.
  4. Using a single shell command, the instructor opens all the assignment files (possibly called HW1assign-student1.Rmd, HW1assign-student2.Rmd, … HW1assign-studentN.Rmd).
  5. Instructor (or TA) looks at each assignment separately, grades each one separately, and saves / knits each assignment. [n.b., step #5 is the only step which is not automated, it includes the assessment of the content of the assignment.]
  6. Using a single shell command, the instructor commits and pushes all of the graded assignments back to the individual student repositories.

While GitHub Classroom does not grade assignments automatically, it does facilitate the downloading and uploading of assignments from and to students. From the students’ perspective, they work with GitHub Classroom in exactly the same way that they would work with GitHub. But from the instructor perspective, the organization of assignments is seamless.

Where can I get help?

Fiksel et al. (2019) wrote about using GitHub Classroom in both an introductory statistics class as well as an upper division undergraduate statistics class. They motivate the use of the software tool as well as provide extensive instructions on getting GitHub Classroom up and running. In particular, Jacob Fiksel has provided guides for students and teachers with step-by-step instructions for creating, organizing, and assessing assignments for a large number of students simultaneously. His guides include .gif files and videos for students and teachers who might be hesitant to embark on using the tool.

About this blog

Each day during the summer of 2019 we intend to add a new entry to this blog on a given topic of interest to educators teaching data science and statistics courses. Each entry is intended to provide a short overview of why it is interesting and how it can be applied to teaching. We anticipate that these introductory pieces can be digested daily in 20 or 30 minute chunks that will leave you in a position to decide whether to explore more or integrate the material into your own classes. By following along for the summer, we hope that you will develop a clearer sense for the fast moving landscape of data science. Sign up for emails at!forum/teach-data-science (you must be logged into Google to sign up).

We always welcome comments on entries and suggestions for new ones.