I’ve used GitHub with my AP Computer Science students for a couple of years, and last year I used GitHub Classroom for the first time. GitHub Classroom definitely made version control more accessible to my students. @mozzadrella wrote about my approach with my students in her Teacher Spotlight series.
As I prepare for the next school year and year 2 of GitHub Classroom, I wanted to make sure that I followed the best practices. For example, I read that there should be a one-to-one mapping between organizations and Classrooms. So, I’ve been reading the GitHub Education Community and playing around. Today, I successfully made it through preparing for the first unit of the upcoming school year. There are a series of steps:
- Create a new organization for the upcoming school year (NNHSAPCS201718 for my AP Computer Science class). I also created a new organization for the entire computer science department at my school (NNHSComputerScience). This organization will not be shared by students and will contain starter code repositories, old assignments, and sample solutions for teachers to reference. Previously, I was using the same organization that I used with GitHub Classroom last year.
Request that the new organization be upgraded to have free unlimited private repositories. My request was approved in minutes!
Create a new GitHub Classroom associated with the new organization for the upcoming school year.
(Optional) Transfer the repositories from last year’s GitHub Classroom organization into the new department organization. I will use this organization indefinitely and want everything sourced from here.
Make any changes to the repository on which your first Classroom assignment will be based.
Push the repository from the department organization to the organization for the upcoming school year. (This also pushed the branches. Is there a way only to push the master branch?)
Squash commits for the repository in the organization for the upcoming school year. In the interactive mode for rebase, leave the first commit as pick and change the rest from pick to squash. Then specify a single comment (e.g., “prepared for 2017-2018 school year”).
git rebase --interactive --root git push --force
Create a new GitHub Classroom assignment based on the repository in the new organization for the upcoming school year.
Repeat 4-8 for each repository (e.g., unit).
p>I am not sure if this actually follows best practices, but it seems pretty good so far and is based on the comments of others with more familiarity with GitHub and git than I.
If you have any suggested improvements or questions, please comment!