Updating assignments AFTER students have started

I am using GitHub classroom with a template repo. (Readme , instructions code templates etc)

Does anyone have a good way to update the student repos? For example if I find a mistake in the instructions .

For now I am adding my template repo as a remote and forcing this over the top, but this could get me into a bit of a mess if i am not careful.

Any ideas?

Write a script that

  1. Clones all the repositories
  2. Iterates over the cloned repos and makes the necessary updates
  3. Pushes the changes.

Your script can even flag when the target file has changed, so you don’t accidentally and unknowingly overwrite student work.

The main limitation of this approach is that you need to get all your students to pull their repos. (And if they don’t, you’ll have to help them later when they can’t push their code.)

Here’s another option which may be feasible depending on your environment. The following git commands will updated their repo from your original repo:

git remote add upstream URI
git fetch upstream
git checkout master
git merge upstream/master

More information is available here:

Honestly, I haven’t bothered to try and do this in a few years. If the changes are minor, it is easier to share them via another method and have students copy and paste the updates.

Embarrassingly, I’ve just killed the assignment and regenerated it because usually I find my mistakes within a day or two, and my students aren’t such go-getters that they’ve already done any real work yet. For simple class (CS1, CS2, etc.), I think this would even work if a few days in, because honestly any minor changes they’ve done can easily be ported to new repo.

If a simple mistake of a binary or docs (you mentioned instructions), you can always just post that somewhere else as an announcement on your LMS / mass-email, and they could read it, and even download to repo to overwrite if necessary.

Now for larger project repo a week old or more with a handful of expected code changes, then I can understand, and should probably used one of those script methods above…

© 2017 GitHub, Inc.
with by
GitHub Education