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).
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!
Geoff: Very helpful. I’m in a similar situation as you (trying to find an easy and efficient way to use GitHub Classroom with my students) and had come up with a similar strategy as you. However, I hadn’t considered the Transfer option. Interesting. When you transfer, what does the destination repo look like vis-a-vis branches, commit history, etc. (I don’t want the students to see all the changes I’ve been making, but to only see a virgin set of files that they begin with.)
Again, thanks for the post! –Greg
The destination repo looks just like the original; only the owning organization has changed.
I too didn’t want students to see the entire change history. Based on @dondi’s advice: https://education.github.community/t/how-to-grade-assignments-on-github/13663/9, I pushed the repo to the organization associated with Classroom and then squashed the commits (steps 6 & 7).
Is there any update avalaible ? Im going to start using Github Classroom and i want to know experiences….
This worked out great last year, and I’m following the same series of steps this year.
Something related to the above and not mentioned is that I personally accept the GitHub Classroom assignment and create a branch for each of my class periods to capture any coding and notes that we do as an entire class. Links to these public branches are posted on my LMS to make it easy for students who missed class to see what we did.
Thanks so much for posting this, Geoff. It was really helpful to me in getting my own class set up.