Upcoming GitHub Classroom Improvements

Hello folks!

I am the newest PM for GitHub Classroom and am here to provide you with info about some upcoming improvements :rocket:

We on the Classroom team wanted to provide an update about an exciting new change coming to GitHub Classroom next month. This change will allow you to preserve Git history on student’s repositories and easily create new assignments. This change should only simplify your experience as a Classroom teacher, and we hope will make things easier for your assignment creation moving forward!

What is it?

Classroom is moving away from requiring a repository to be a Template in order to create an assignment from it. This will fully eliminate the need to mark your starter code repo as a Template :tada: Additionally, now student repositories will be able to see the previous commit history for the starter repository as well. This will make it easy to provide examples of “good” commit messages to students and exemplify the GitHub workflow! Plus some additional goodies to be announced in the future like updating assignments after a student has accepted it :blush:

What impact can I expect?

  • You will no longer need to mark a repository as template to use it as assignment starter code
  • Repository commit history will now be preserved with new student repositories GitHub Classroom creates
  • Any existing template repositories you may have can remain as is! They will still work just fine in this new model and will include the commit history as well.

When?

We are targeting mid-July for public availability of these changes. You can also get these update even earlier by signing up with this form.

Questions or concerns?

As always, we would love to hear your thoughts on this new experience! And we are happy to answer any questions you may have in the comments below.

As well, feel free to use our normal support channels for any issues you may encounter.

Opt in to the beta program for these changes here.

2 Likes

@acrokat Upcoming improvements sounds great !!! I think the feature that allow to see the previous commit history for the starter repository will be very useful :tada: I’ll be waiting for testing these features next semester :school: :wink:

Will there be a way to not preserve the commit history of the starter repo?

@sjgoebel With the new process, unfortunately there won’t be an option to not preserve commit history. However if you don’t want commit history to be shown, you could always squash all your commits on the main branch using git rebase -i HEAD~<NUMBER OF COMMITS ON DEFAULT BRANCH>.

1 Like

Thanks Stephanie,

I assume the answer is no, but just to confirm, does rewriting the history on a repository used for classroom assignments have a negative impact on older assignments created from that same upstream repository prior to the rewrite?

@stephaniegiang Thanks - I just realized I can keep using template repositories to accomplish this.

@Dangeranger There should be no negative impact on older assignment repositories created by Classroom.

1 Like

To clarify, this new approach will be replacing the Template repos functionality used currently, so using a repo marked as Template for your starter code will still have the same behavior as a repo that is not.
Squashing commits as Stephanie mentioned above will be the best approach if you would like to hide previous history.
Apologies for the confusion! Will clarify this int he original post as well :grinning:

I keep my original repos in a separate org and create a new org each year for each class. I meant that I can still “use this template” to make a yearly copy in the new org that doesn’t have a commit history.

1 Like

@acrokat - thanks for the notice. I’m sure I’m not the only one who has this workflow: I write solution code to my assignments as I work on them, in order to be sure the instructions are accurate and that a solution is possible. Then, just before converting into an assignment, I delete the solution code. These changes will make that workflow impossible, since students would be able to see the solution in the commit history.

I think that you can remove the commits that include the solution by performing an interactive rebase to the original commit or one earlier than where the solution was added. During the interactive rebase you can choose to drop those commits which include the solution code. Another approach could be to use a “solution” branch in the source repository, then when you create your assignment it should only use the “main” or “master” branch as the source, omitting the “solution” branch code.

1 Like

@Dangeranger - thanks for the ideas. I prefer to keep the solutions accessible in the future, so the solution branch solution would work. I had assumed all branches would be copied over to an assignment, but I did a little test run and it seems that you are right - only the main branch carries over. This solves my problem.

This change still seems odd. I understand the need to demonstrate good commit messages. But is this something needed on every single assignment at the expense of any other workflow?

It seems obvious to have a few more choices for how assignments are handled, rather than fewer… i.e. whether students get a new copy of the repository or a proper fork; a way to select which branch is used for an assignment; whether commit history is copied over or not; whether branches are copied over or not; etc.

My guess is that this change has more to do with some sort of technical debt that was required by the “template” style repositories. Originally Github Classroom did not use the “template” approach, and this caused increased processing time while Github was cloning the student repositories from the starter repo.

I would wager that a lot of engineering work has gone into making the cloning process faster, but one of the trade-offs was that the commit history must be available using whatever approach the technical team implemented.

Thanks folks for all the feedback!

To add a bit more color to the change, we have been working to make our assignment flow more reliable and stable over the past year. As part of this effort, we have done a lot of backend work to leverage GitHub infrastructure instead of relying on the public APIs. These changes should be more reliable than source importer and template which we have been using previously.
Additionally, this lays the foundation for us to build other top requested features such as updating an assignment after a student has accepted it :dizzy:

Hope that helps!

3 Likes

Hi folks! Wanted to provide a quick clarification and update here. We will copy over all branches from the starter repo when creating the assignment repos.

Generally, we are working to make it easier to understand the different ways to approach removing history before shipping this functionality broadly. I will be sure to let you folks know once we have an updated timeline of when that will happen.

Thanks again for the inputs!

© 2017 GitHub, Inc.
with by
GitHub Education