My guides to using GitHub Classroom for teachers and students

Hi Jacob,

Thanks a lot for sharing this guides!

Your how-to about Grading assignments is highly valuable, as I’m still looking at optimizing that part of my workflow.


1 Like

Jacob, thank you for including my script in your tutorial as well as the pull request. I’m glad you found it useful enough to contribute and share.

1 Like

@jfiksel this is awesome. Cool if I share it on Twitter from the Education account?

1 Like

@mozzadrella of course, no problem–glad you like it!


Thanks so much for capturing and sharing your workflows. I’m wondering about the starter code. It seems that creating a classroom and populating it with starter code from another repo brings all the previous commits. Have you found that to be true? Do you mind your students seeing all that? (Personally, I’m going to create a “scratch” repo each semester, copy my master starter code there and then create the assignment using that scratch repo to initially populate the student’s assignment repos.)

Again, great job and thanks! --Greg

I’m glad you liked the guide, @gregnordstrom! Yes, I believe it does bring the previous commits. I actually haven’t thought too much about this, but my current position is that I think it’s actually a good thing for the students to see what a commit history looks like (as long as you practice what you preach with commits, which is not always the case for me :slight_smile:) I also don’t think that students in an intro class will even notice the previous commits, especially when we’re trying to not have Git be the focus of the class.

If this is something you’re worried about, what I’ve seen suggested is to fork the starter code repo from the master organization into your class organization, and then squash the commits. You can then use this forked repo as the starter code. I’ve actually never squashed my commit history before, but it looks like there are quite a few guides floating around online. I’m also sure someone in this community can give you some advice on this.

Hope this was helpful!

1 Like

In my class, students build new features every week. In the subsequent week, they get my “reference” solution and build more from there. This led me to a complex set of branches, starting from “master” and then forking each week from there. So weekN is master, but with some things deleted. weekN-1 is weekN with a few more things deleted. And so on down to the week1 branch which has very little there.

(And yes, when I want to make a small change to the master, I have to rebase all the branches. Uggh.)

Given this structure, what I’m doing to create the “release” branches for the students is roughly:

  • Clone a fresh copy of the repo from GitHub
  • git checkout weekN
  • rm -rf .git
  • git init . ; git add . ; git commit -m ‘weekN ready to go’

And then I create a repo at GitHub and push this new repo, now completely free of my commit history.


My student instructions look a lot like yours, except for IntelliJ IDEA rather than for RStudio. IntelliJ has specific support for GitHub in it, including GitHub’s token-based login thing. While they’re working, I’m mostly just telling them “thou shalt commit and push, simultaneously”, since this will be for most of them their very first exposure to Git. Gotta start simple.

Travis-CI is going to be fun as well. So far as I can tell, you have to manually enable Travis-CI on each and every student repo, which you can’t do until the student accepts the GitHub Classroom link. This basically means that I’ll have to take a swing at it every night to pick up stragglers. For the most part, though, I’m seeing Travis-CI as a feature for the graders more than for the students. If I get this right, for most students, the graders will never leave their web browser. They’ll visit a student repo, click to the commits, verify the green checkmark from Travis-CI, and then they just need to browser the code to make sure the students didn’t do something dumb, like disable all the unit tests we provide them.

For the students, themselves, I’m basically telling them to run gradle check locally, which then runs CheckStyle, ErrorProne, and their unit tests. In later weeks, it will also run JaCoCo for code coverage requirements. The only reason a student might need to visit is if they’re paranoid that their code didn’t get pushed.

Sadly, Travis-CI only offers one simultaneous build for freebie accounts like the one they’ve offered me. They’ve done some performance tuning, but it still seems to take about a minute of CPU time for a given repo to be checked out and the tests to run. If all 160 of my students do a push within five minutes of the final deadline, it will be 3+ hours before all the tests have finished.

On the one hand, this is bothersome due to the lack of instant feedback. On the other hand, it tells students that there’s a benefit to running locally. It’s the same tests running in either place.


Just wanted to say thanks to @jfiksel for sharing this. Ran into a bit of an issue I’m working through on the


“fatal: Cannot change to ‘pull’: No such file or directory”

Anyone else run into this one? Everything connects (via SSH) and goes through the process fine.

Thanks in advance.

So I wanted to reply with a solution in case anyone else runs into this. Turns out it was an authentication error stopping everything.

I have 2FA set up on my account. In order to get the script to work, I needed to switch to https and authenticate with a generated GitHub access token.

It’s working wonderfully!

1 Like

Sorry for the late response @readoc, glad that it’s working for you! And thanks for your comment, I’m sure that more people in the future will have this problem. If you feel that there should be another script in the mass_clone repo that accommodates 2FA, feel free to make a pull request.

Hi all–if you have already cloned the mass_clone directory, there have been some important updates in the repository that can be found here: . Please pull in these changes, otherwise you may have problems once your classroom organization has over 100 total repositories.

Not to worry @jfiksel. It’s been working well. If I make changes, I’ll make sure to do a pull request.

I also wrote an article, but it was written in Chinese.

1 Like

I think I’m having the same problem. I’ve never done ssh with github before and I’m not sure how to get this to authenticate properly. Do you know where I can find more documentation to set this up?

I ended up not using SSH.

Instead, I used https with a GitHub access token that I generated.

1 Like

Hi @jfiksel, just wanted to say thanks for writing this guide. Just yesterday, I found out that there’s a thing called “github classroom.” I learned that shortly after I found out that the place I’m about to start teaching uses github classroom. Anyhoo, I can tell already that your guide is going to save me a ton of time getting this set up.

@wffoote I’m glad these guides were helpful! I’m hoping to improve the student guides based off feedback from my class last semester. Please let me know if there is anything for the teaching guides that is unclear or should be explained in more depth.

Hi everyone–I have updated these guides with plenty of GIFs to help in the visualization of all of the processes, for both students and teachers. I think this will be especially helpful for students and instructors who have never used the terminal before. Again, if you have any feedback on the guides, please let me know. In addition, it would be great to get additional options for grading in the teacher guide, as I only have the workflow we used in my class.

Great information Jacob! We are going to try to use GitHub Classroom in our software development class starting soon. I like your ideas on how to use orgs to manage master/session assignments, however I could figure out how to request unlimited private repos as the form requires me to enter the # of them we’ll need when I don’t know what that number will be. Thanks in advance for any suggestions. Kevin