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 Community and playing around. Today, I successfully made it through preparing for the first unit of the upcoming school year.
I captured the series of steps on my blog.
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 share!
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
P.S. I originally posted this reply on your blog, but thought others here might benefit w/o going to the blog post. Sorry for the double post.
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, I pushed the repo to the organization associated with Classroom and then squashed the commits (steps 6 & 7).
@gcschmit this is great, thanks! I was just wondering what you do when you have a new batch of students for adding them to the organization. Do you manually enter in all of their emails? Or do you have a script or a way of getting them into the organization without you having to do the work?
Last year, I didn’t add students to the organization at all. Instead, I published the link to the GitHub Classroom assignment, and students, already logged into their GitHub account, clicked on it to accept the assignment. It appears this automatically added them to the organization.
Interesting! I will try this out when the semester starts and confirm that this works for me as well.
@gcschmit, I just tried this out. It looks like if someone who is not currently in the organization accepts an assignment, they are added as an outside collaborator in the organization, but NOT as a member. However, once they are an outside collaborator, you can easily invite them to the organization through the Outside collaborators tab in the People section of the organization, which does avoid having to manually enter emails.
You can invite students to become members using ghedsh (
gem install ghedsh)
ghedsh instructions: iinvite_member <user1, user2, user3, …, n>. Other commands:
Youtube video Inviting people to a Github Organization using ghedsh. Invitando a los alumnos a la Organización Github usando ghedsh.